Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-07-05 16:10:38 +03:00
parent 7cab3c18a7
commit f39d449ca2
2 changed files with 3 additions and 3 deletions

View File

@ -32,10 +32,10 @@ func filterLabel(r []router.Route) []router.Route {
*/ */
type httpClient struct { type httpClient struct {
opts client.Options
httpcli *http.Client httpcli *http.Client
init bool opts client.Options
sync.RWMutex sync.RWMutex
init bool
} }
func newRequest(addr string, req client.Request, ct string, cf codec.Codec, msg interface{}, opts client.CallOptions) (*http.Request, error) { func newRequest(addr string, req client.Request, ct string, cf codec.Codec, msg interface{}, opts client.CallOptions) (*http.Request, error) {

View File

@ -240,7 +240,7 @@ func (h *httpClient) parseRsp(ctx context.Context, hrsp *http.Response, rsp inte
} }
if cerr := cf.ReadBody(hrsp.Body, rerr); cerr != nil { if cerr := cf.ReadBody(hrsp.Body, rerr); cerr != nil {
err = errors.InternalServerError("go.micro.client", cerr.Error()) return errors.InternalServerError("go.micro.client", cerr.Error())
} }
if err, ok = rerr.(error); !ok { if err, ok = rerr.(error); !ok {