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

Always remove the right listener from the hub #498

Closed

Commits on Sep 22, 2020

  1. Always remove the right listener from the hub

    When in hubs.trampoline(fd, ...), a greenthread registers itself as a
    listener for fd, switches to the hub, and then calls
    hub.remove(listener) to deregister itself. hub.remove(listener)
    removes the primary listener. If the greenthread awoke because its fd
    became ready, then it is the primary listener, and everything is
    fine. However, if the greenthread was a secondary listener and awoke
    because a Timeout fired then it would remove the primary and promote a
    random secondary to primary.
    
    This commit makes hub.remove(listener) check to make sure listener is
    the primary, and if it's not, remove the listener from the
    secondaries.
    smerritt authored and tipabu committed Sep 22, 2020
    Configuration menu
    Copy the full SHA
    0443a1f View commit details
    Browse the repository at this point in the history