stomp-js / stompjs

Javascript and Typescript Stomp client for Web browsers and node.js apps
Apache License 2.0
777 stars 81 forks source link

Replaced ping setInterval integration with webworker #579

Open tomamatics opened 1 year ago

tomamatics commented 1 year ago

The use of setInterval can be paused by the OS as soon as the browser tab or mobile browser app is in the background. Due to this behavior, the Stomp client library no longer sends ping messages and the Stomp server will close the connection. By using a webworker, the affected code will continue to run and ping-messages will be sent, even if the tab/app is not active.

kum-deepak commented 1 year ago

This does look interesting and useful. A couple of feedback:

Please only commit changes to the src folder. Makes it easier to review and compare.

kum-deepak commented 1 year ago

Many thanks! The code looks beautiful. Please allow me a few days to review this.

I may have a few suggestions - those will be optional. In addition, if possible, we should figure out to include it as part of the tests as well.

tomamatics commented 1 year ago

Thanks for the review. Again, i fixed some minor issues. Tests should be running now.

kum-deepak commented 1 year ago

Will release as pert of v7.1

drando commented 1 year ago

Hi! sorry to ask, do you have an estimated ETA for v7.1? can't find that info, and this would be great to finally resolve the issue about timers throttled in chrome. Thanks!

ianninirojas commented 1 year ago

Hi, does anyone know when v7.1 will be released. Sorry if this question makes anyone uncomfortable. Greetings.

ghost commented 1 year ago

Please refrain from asking for the release (and for anything else for that matter), as it will:

  1. Spam everybody's inbox that subscribed to this ticket
  2. Does not help in releasing this faster to the public
  3. Is straight up annoying