mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
fix client do method done not use when err not nil (#1948)
This commit is contained in:
parent
ae230eb550
commit
4472cdbf49
@ -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…
Reference in New Issue
Block a user