fix: reconnect immediately on tab visibility (iOS)

This commit is contained in:
jay 2026-05-14 19:22:46 +02:00
parent 74fc22ddfb
commit 94b4dc7a41
1 changed files with 9 additions and 0 deletions

View File

@ -717,6 +717,15 @@ export function buildHTML(nonce: string): string {
});
connect();
document.addEventListener('visibilitychange', function () {
if (document.visibilityState === 'visible') {
if (!ws || ws.readyState !== 1) {
clearTimeout(timer);
connect();
}
}
});
})();
</script>
</body>