File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ public class RetryDelegatingHandler : DelegatingHandler
2323
2424 private readonly ReliabilitySettings settings ;
2525
26- private readonly Random random = new Random ( ) ;
27-
2826 /// <summary>
2927 /// Initializes a new instance of the <see cref="RetryDelegatingHandler"/> class.
3028 /// </summary>
@@ -107,8 +105,10 @@ private static void ThrowHttpRequestExceptionIfResponseCodeCanBeRetried(HttpResp
107105
108106 private TimeSpan GetNextWaitInterval ( int numberOfAttempts )
109107 {
108+ var random = new Random ( ) ;
109+
110110 var delta = ( int ) ( ( Math . Pow ( 2.0 , numberOfAttempts ) - 1.0 ) *
111- this . random . Next (
111+ random . Next (
112112 ( int ) ( this . settings . DeltaBackOff . TotalMilliseconds * 0.8 ) ,
113113 ( int ) ( this . settings . DeltaBackOff . TotalMilliseconds * 1.2 ) ) ) ;
114114
You can’t perform that action at this time.
0 commit comments