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

EngineIO does not timeout on missing pings #358

Closed
sirkrypt0 opened this issue Sep 26, 2023 · 0 comments · Fixed by #359
Closed

EngineIO does not timeout on missing pings #358

sirkrypt0 opened this issue Sep 26, 2023 · 0 comments · Fixed by #359

Comments

@sirkrypt0
Copy link
Contributor

Problem Description

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.

See also https://socket.io/docs/v4/how-it-works/#disconnection-detection

Currently, this is not respected and the client does not recognize (and then terminate) a dead connection.

Steps To Reproduce

  1. Start a long running client and server (like the ones from Asynchronous Client: "Error while parsing an incomplete packet socketio" on first heartbeat killing the connection #311) but start them in separate Docker containers
  2. Start the server and then the client
  3. Pause the server container with docker pause
  4. Wait for 60 seconds and notice that the client continues to run and doesn't notice that the server isn't alive anymore.

Possible Solution

Polling via HTTP or waiting for the next packet in WebSockets should be guarded with a timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant