Skip to content

Commit

Permalink
SNOW-1739583 Fix of rounding issue (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dstempniak authored Oct 25, 2024
1 parent 898a2f0 commit f995ba6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Snowflake.Data/Core/HttpUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
// No need to wait more than necessary if it can be avoided.
// If the rest timeout will be reached before the next back-off,
// then use the remaining connection timeout.
// Math.Max with 0 in case totalRetryTime > restTimeout.TotalSeconds
backOffInSec = Math.Max(Math.Min(backOffInSec, (int)restTimeout.TotalSeconds - totalRetryTime), 0);
backOffInSec = Math.Min(backOffInSec, (int)restTimeout.TotalSeconds - totalRetryTime + 1);
}
}
}
Expand Down

0 comments on commit f995ba6

Please sign in to comment.