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

Release websocket handshake response if pipeline checks fail #13338

Merged
merged 1 commit into from
Apr 20, 2023

Commits on Apr 17, 2023

  1. Release websocket handshake response if pipeline checks fail

    Motivation:
    The WebSocketServerHandshaker require that either an HttpRequestDecoder or an HttpServerCodec exist in the pipeline.
    If they do not, we can't send a websocket handshake response.
    The handshake response is allocated prior to the pipeline checks.
    Therefor, if the checks fail, we need to release the response before returning the failed future.
    
    It might be possible to delay the allocation of the response until after the pipeline checks, but doing so breaks assumptions made by numerous tests.
    
    Modification:
    If the pipeline checks fail, release the handshake response before returning the failed promise.
    
    Result:
    We no longer leak a buffer in the handshake response if the pipeline checks fail.
    chrisvest committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    f02c89c View commit details
    Browse the repository at this point in the history