mirror of
https://github.com/rclone/rclone.git
synced 2025-02-02 03:29:51 +01:00
rest: call the Signer with the mutex unlocked
This enables the signer to adjust rest parameters and call rest again if necessary.
This commit is contained in:
parent
65071599a2
commit
14e93bfd8a
@ -269,7 +269,9 @@ func (api *Client) Call(ctx context.Context, opts *Opts) (resp *http.Response, e
|
|||||||
c = api.c
|
c = api.c
|
||||||
}
|
}
|
||||||
if api.signer != nil {
|
if api.signer != nil {
|
||||||
|
api.mu.RUnlock()
|
||||||
err = api.signer(req)
|
err = api.signer(req)
|
||||||
|
api.mu.RLock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "signer failed")
|
return nil, errors.Wrap(err, "signer failed")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user