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

Limit minimal time poll.Wait* functions can wait between attempts #2543

Merged
merged 2 commits into from
Dec 19, 2023

Commits on Dec 19, 2023

  1. Limit minimal time poll.Wait* functions can wait between attempts

    Currently calculation of sleep time can make it negative, which
    makes `t.C` channel return right away and does not give ctx time
    to finish on deadline.
    This means that even if context is expired, retries still happen until
    there are no more retries.
    
    The fix is to cap minimal sleep time at 5ms to make sure that context
    can perform expiration.
    
    NOTE: we could make the minimal sleep smaller, but it's wouldn't make sense
    getting less than OS scheduling frequency.
    hairyhum committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4e86e12 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b76735 View commit details
    Browse the repository at this point in the history