workfloworchestrator / orchestrator-ui-library

Component library for the orchestrator-ui (v2) which is published in npm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve websocket persistence

DutchBen opened this issue · comments

The websocket connection between browser and server is kept fresh by initiating a ping/pon every x seconds. This is set using a setInterval. When a page becomes inactive - it might be in a tab that's not currently active - the interval stops executing and the websocket disconnects.

One possible solution for this is to use a webworker https://medium.com/@adithyaviswam/overcoming-browser-throttling-of-setinterval-executions-45387853a826