We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc18acc commit cd36d3dCopy full SHA for cd36d3d
src/SvnManager.WebUI/SvnBackups.cs
@@ -7,6 +7,7 @@
7
using System.Diagnostics;
8
using System.IO;
9
using System.Linq;
10
+using System.Threading;
11
12
namespace SvnManager.WebUI
13
{
@@ -51,7 +52,26 @@ public static void Upload()
51
52
FilePath = file.FullName
53
};
54
- resps.Add(c.UploadPart(upReq));
55
+ int tries = 1;
56
+ UPLOAD:
57
+ try
58
+ {
59
+ resps.Add(c.UploadPart(upReq));
60
+ }
61
+ catch (Exception ex)
62
63
+ var origEx = ex;
64
+ while (ex.InnerException != null)
65
+ ex = ex.InnerException;
66
+
67
+ if (ex is System.Net.Sockets.SocketException && ex.Message.Contains("connection attempt failed") && tries <= 3)
68
69
+ tries++;
70
+ Thread.Sleep(30_000);
71
+ goto UPLOAD;
72
73
+ throw origEx;
74
75
76
filePosition += partSize;
77
}
0 commit comments