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(bin): don't sleep when events available #1806

Merged
merged 2 commits into from
Apr 15, 2024

Commits on Apr 9, 2024

  1. fix(bin): don't sleep when events available

    A call to `process_*` can emit events as a side effect, e.g. a
    `ConnectionEvent::StateChange(State::Connected)`. These are not returned from
    the function call, but instead internally enqueued to be later on consumed
    through the various `Provider::next_event` implementations.
    
    https://github.com/mozilla/neqo/blob/166b84c5a3307d678f38d9994af9b56b68c6b695/neqo-common/src/event.rs#L9-L15
    
    In the case of `neqo-client` the events are consumed through
    `self.handler.handle` which internally calls `Provider::next_event`.
    
    A client or server should not go to sleep, waiting for either a UDP datagram to
    arrive or a timeout to fire, when there are events available.
    
    This commit ensures `ready().await` is only called when no events are available.
    mxinden committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    342f492 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. Configuration menu
    Copy the full SHA
    6227f50 View commit details
    Browse the repository at this point in the history