Skip to content

Heartbeat timeout is no longer reset on packet #5450

@streunerlein

Description

@streunerlein

Describe the bug
We have a high volume of data incoming from our sockets and they get disconnected at PingInterval+Timeout s with a ping timeout because the server has not received a pong, however it has received other messages from these sockets.

Image

Note how some connections drop after ~40seconds and reconnect.

There was a fix for this in socketio/engine.io@be7b4e7 which got reverted in 5359bae

While I understand the "wastefulness" of creating timers on every packet, I still think the point of the socket being very much alive if there is data coming from it is valid (even when the pong packages is coming through timely).

Is there a chance to revert the revert?

To Reproduce

Please fill the following code example:

Socket.IO server version: 4.x

Send a lot of packages from the client, watch them disconnect after ~40 seconds even when data is coming from them.

Expected behavior
Connections should not be considered stale if there are still packets coming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    to triageWaiting to be triaged by a member of the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions