1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 15:53:41 +00:00

b2: Fix handling of token expiry #420

Found with --b2-test-mode expire_some_account_authorization_tokens
This commit is contained in:
Nick Craig-Wood
2016-07-01 11:47:42 +01:00
parent 6f3897ce2c
commit cbebefebc4
2 changed files with 10 additions and 16 deletions

View File

@@ -178,9 +178,8 @@ func (up *largeUpload) transferChunk(part int64, body []byte) error {
var response api.UploadPartResponse
resp, err := up.f.srv.CallJSON(&opts, nil, &response)
if err == nil && resp != nil && resp.StatusCode == 401 {
err = errorUploadPartTokenExpired
fs.Debug(up.o, "%v", err)
if resp != nil && resp.StatusCode == 401 {
fs.Debug(up.o, "Unauthorized: %v", err)
// Refetch upload part URLs and ditch this current one
up.clearUploadURL()
return true, err