You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use TotalSeconds/TotalMilliseconds in WaitAndRetry timeout comparison
TimeSpan.Seconds returns only the seconds component (0-59), not the
total seconds. For timeouts >= 60 seconds (e.g. the default 60s),
.Seconds is 0 because it's exactly 1 minute. This caused WaitAndRetry
to always throw a timeout exception instead of retrying, with the
misleading message 'The request took longer than the 0 milliseconds
allowed'.
The fix uses .TotalSeconds and .TotalMilliseconds which return the
full value regardless of magnitude.
Added regression tests for timeouts >= 60s and correct millisecond
reporting in error messages.
Bumps version to 3.2.1.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,6 +234,12 @@ Fixed handling of No Content responses
234
234
235
235
- Extend shipment endpoints to request, create, update and delete estimated import charges.
236
236
237
+
## 3.2.1
238
+
239
+
### Fixed
240
+
241
+
- Fixed `WaitAndRetry` using `TimeSpan.Seconds` and `TimeSpan.Milliseconds` (component-only, 0-59 / 0-999) instead of `TimeSpan.TotalSeconds` and `TimeSpan.TotalMilliseconds`. This caused retries to always fail with a spurious timeout exception for any timeout >= 60 seconds (including the default), with the misleading message "The request took longer than the 0 milliseconds allowed".
0 commit comments