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

peer: send reestablish, shutdown messages before starting writeHandler #8186

Merged
merged 1 commit into from
Nov 16, 2023

Commits on Nov 16, 2023

  1. peer: send reestablish, shutdown messages before starting writeHandler

    This is to avoid a potential race on WriteMessage and Flush internals.
    Because there is no locking on WriteMessage and Flush, if we allow
    writeMessage calls in Start after the writeHandler has started,
    the writeMessage calls may call WriteMessage/Flush at the same time
    that writeMessage calls from the writeHandler does. Since there is
    no locking, internals like b.nextHeaderSend can race and cause
    panics.
    Crypt-iQ committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    7556402 View commit details
    Browse the repository at this point in the history