mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +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 {
|
if err == nil {
|
||||||
err = client.opts.errorDecoder(req.Context(), resp)
|
err = client.opts.errorDecoder(req.Context(), resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if done != nil {
|
if done != nil {
|
||||||
done(req.Context(), selector.DoneInfo{Err: err})
|
done(req.Context(), selector.DoneInfo{Err: err})
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user