Skip to content

Commit

Permalink
Fixed bug where retryAfter header returned value in seconds but the d…
Browse files Browse the repository at this point in the history
…elay was in milliseconds. (#5268)
  • Loading branch information
ika-microsoft authored and shahabhijeet committed Feb 21, 2019
1 parent 0f376ea commit 5c045e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace Microsoft.Rest
{
using System;
using System.Globalization;
using System.Linq;
using System.Net;
Expand Down Expand Up @@ -58,7 +59,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
var retryAfter = int.Parse(retryValue, CultureInfo.InvariantCulture);

// wait for that duration
await Task.Delay(retryAfter,cancellationToken);
await Task.Delay(TimeSpan.FromSeconds(retryAfter), cancellationToken);

// and try again
continue;
Expand Down

0 comments on commit 5c045e9

Please sign in to comment.