Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle float Retry-After headers #117

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Handle float Retry-After headers #117

merged 1 commit into from
Nov 30, 2021

Conversation

paulomarg
Copy link
Contributor

WHY are these changes introduced?

Fixes #115

Our code was working under the assumption that the Retry-After header would always be an integer, but it can be a float at times.

WHAT is this pull request doing?

Casting the float back to an integer after we convert it to microseconds, since at that point any remaining fractional value is irrelevant.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have updated the documentation for public APIs from the library (if applicable)

@paulomarg paulomarg requested a review from a team November 30, 2021 14:17
@paulomarg paulomarg force-pushed the allow_float_retry_after branch from a5c3bb0 to 55dc410 Compare November 30, 2021 14:18
@paulomarg paulomarg force-pushed the allow_float_retry_after branch from 55dc410 to 270942c Compare November 30, 2021 14:36
@paulomarg paulomarg merged commit b8f7bd1 into main Nov 30, 2021
@paulomarg paulomarg deleted the allow_float_retry_after branch November 30, 2021 14:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

strict_types declared but usleep() receives a float
2 participants