Merge pull request #4258 from atajsic/master

Update BackblazeB2.cs
This commit is contained in:
Jaex 2019-08-09 21:06:22 +03:00 committed by GitHub
commit 441b63d294
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."); DebugHelper.WriteLine("B2 uploader: Too Many Requests, trying with same URL.");
continue; continue;
} }
else if (uploadResult.RC == 503)
{
DebugHelper.WriteLine("B2 uploader: Service Unavailable, trying with new URL.");
url = null;
continue;
}
else if (uploadResult.RC != 200) else if (uploadResult.RC != 200)
{ {
// something else happened that wasn't a success, so bail out // 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 #endregion JSON responses
} }
} }