Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

rest: call the Signer with the mutex unlocked

Nick Craig-Wood14e93bfd8a7e
diff --git a/lib/rest/rest.go b/lib/rest/rest.go
index e4cd74cef..92edc64fe 100644
--- a/lib/rest/rest.go
+++ b/lib/rest/rest.go
@@ -269,7 +269,9 @@ func (api *Client) Call(ctx context.Context, opts *Opts) (resp *http.Response, e
c = api.c
}
if api.signer != nil {
+ api.mu.RUnlock()
err = api.signer(req)
+ api.mu.RLock()
if err != nil {
return nil, errors.Wrap(err, "signer failed")
}