Tom Jenkinson 8adcfbfde5 fix(sio-client): do not send a packet on an expired connection (#5134)
When a laptop is suspended or a phone is locked, the timer that is used
to check the liveness of the connection is paused and is not able to
detect that the heartbeat has failed.

Previously, emitting a message after resuming the page would lose the
message. The status of the timer will now be checked before sending the
message, so that it gets buffered and sent upon reconnection.

Note: we could also have used the Page Visibility API or a custom
setTimeout() method based on setInterval(), but this would not be as
reliable as the current solution.

Reference: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API

Related: https://github.com/socketio/socket.io/issues/5135
2024-09-18 11:11:22 +02:00
2024-07-22 10:07:45 +02:00
2024-07-09 10:44:20 +02:00
2024-07-08 16:07:34 +02:00

socket.io

Latest NPM version Build status Downloads per month

Getting Started

Please check our documentation here.

Questions

Our issues list is exclusively reserved for bug reports and feature requests. For usage questions, please use the following resources:

Security

If you think that you have found a security vulnerability in our project, please do not create an issue in this GitHub repository, but rather refer to our Security Policy.

Issues and contribution

Please make sure to read our Contributing Guide before creating an issue or making a pull request.

Thanks to everyone who has already contributed to Socket.IO!

License

MIT

Description
No description provided
Readme MIT 42 MiB
Languages
TypeScript 64.1%
JavaScript 35.8%