webui icon indicating copy to clipboard operation
webui copied to clipboard

WebSocket - OS Power Managment Issue

Open AlbertShown opened this issue 8 months ago • 1 comments

We know that browsers kill the WebSocket connection if no activity after 2 minutes, so, WebUI get around that by sending a ping every 30 seconds.

However, now, seems like after an hour, your OS goes to sleep or something, and that make web browser cut/kill all WebSocket active connections in all web sites regardless of its active or not... therefor, all web sites need to re-connect to the server again.

We need to find a way to force browser to not kill WebSocket connection. Or we need to figure out how to make WebUI distinguish between a WebSocket close even because simply the user closed the window, and between close even because OS/Browser killed all active connections to save power.

More inf: https://github.com/webui-dev/webui/discussions/583

AlbertShown avatar Apr 10 '25 19:04 AlbertShown