fix client do method done not use when err not nil (#1948)

pull/1951/head
李洛克 3 years ago committed by GitHub
parent ae230eb550
commit 4472cdbf49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      transport/http/client.go

@ -289,13 +289,12 @@ func (client *Client) do(req *http.Request) (*http.Response, error) {
if err == nil {
err = client.opts.errorDecoder(req.Context(), resp)
}
if err != nil {
return nil, err
}
if done != nil {
done(req.Context(), selector.DoneInfo{Err: err})
}
if err != nil {
return nil, err
}
return resp, nil
}

Loading…
Cancel
Save