Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix accidental truncation of RPC timeouts #131

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

cbrewster
Copy link
Member

Why

asyncio.timeout takes a float in units of seconds. We were truncating to an int so for example a 200ms timeout would be converted to 0s

What changed

  • Remove int()

Test plan

  • Added some tests to make sure timeouts work and that small timeouts are not rounded to 0

@cbrewster
Copy link
Member Author

Current dependencies on/for this PR:

This comment was autogenerated by Freephite.

@cbrewster cbrewster requested a review from a team as a code owner December 10, 2024 17:18
@cbrewster cbrewster requested review from ryantm and blast-hardcheese and removed request for a team December 10, 2024 17:18
@cbrewster cbrewster added bug Something isn't working patch Bump patch version labels Dec 10, 2024
Copy link
Contributor

@blast-hardcheese blast-hardcheese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Why do we cast to int here?"

To make finding the bug much more interesting

@cbrewster cbrewster merged commit e916165 into main Dec 10, 2024
3 checks passed
@cbrewster cbrewster deleted the 12-10-Fix_accidental_truncation_of_RPC_timeouts branch December 10, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Bump patch version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants