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(engineio): respect pingTimeout and pingInterval to stop connection #359

Merged
merged 1 commit into from
Mar 31, 2024

Commits on Dec 4, 2023

  1. fix(engineio): respect pingTimeout and pingInterval to stop connection

    The Engine.IO protocol features a heartbeat mechanism which ensures that the
    connection between server and client is alive. During that heartbeat, the
    server sends PINGs to which the client responds with PONGs. Both parties
    can therefore detect whether the connection is still alive, based on the
    pingInterval and pingTimeout received in the initial handshake.
    
    However, we previously didn't make use of that in the Engine.IO implementation,
    which lead to disconnects not being properly recognized.
    
    We now respect these settings and return an error and disconnect the connection,
    once the pingInterval+pingTimeout time has passed.
    
    See also https://socket.io/docs/v4/how-it-works/#disconnection-detection
    sirkrypt0 committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    cbbe483 View commit details
    Browse the repository at this point in the history