Update BackblazeB2.cs

Fixes #4187
This commit is contained in:
Andrew 2019-08-09 23:45:54 +10:00 committed by GitHub
parent 857298909b
commit afca1de5bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,6 +213,12 @@ public override UploadResult Upload(Stream stream, string fileName)
DebugHelper.WriteLine("B2 uploader: Too Many Requests, trying with same URL.");
continue;
}
else if (uploadResult.RC == 503)
{
DebugHelper.WriteLine("B2 uploader: Service Unavailable, trying with new URL.");
url = null;
continue;
}
else if (uploadResult.RC != 200)
{
// something else happened that wasn't a success, so bail out
@ -678,4 +684,4 @@ public B2Upload(string fileId, string fileName, string accountId, string bucketI
#endregion JSON responses
}
}
}