Skip to content

Commit

Permalink
fixes issue Azure#890
Browse files Browse the repository at this point in the history
  • Loading branch information
amarzavery committed Apr 5, 2016
1 parent 6142fb7 commit 97545e3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public override ShouldRetryHandler GetShouldRetryHandler()
{
var random = new Random();

var delta = (int) ((Math.Pow(2.0, currentRetryCount) - 1.0)*
random.Next((int) (_deltaBackoff.TotalMilliseconds*0.8),
(int) (_deltaBackoff.TotalMilliseconds*1.2)));
var interval = (int) Math.Min(checked(_minBackoff.TotalMilliseconds + delta),
var delta = (Math.Pow(2.0, currentRetryCount) - 1.0) *
random.Next((int) (_deltaBackoff.TotalMilliseconds*0.8),
(int) (_deltaBackoff.TotalMilliseconds*1.2));
var interval = (int) Math.Min(_minBackoff.TotalMilliseconds + delta,
_maxBackoff.TotalMilliseconds);
TimeSpan retryInterval = TimeSpan.FromMilliseconds(interval);

Expand Down

0 comments on commit 97545e3

Please sign in to comment.