From 4c1c5cd1a612474bc0539c23bde4785713da9b6e Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Tue, 14 Oct 2025 13:06:59 +0200 Subject: [PATCH] Fix keep WebSockets alive. --- basicswap/static/js/modules/websocket-manager.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/basicswap/static/js/modules/websocket-manager.js b/basicswap/static/js/modules/websocket-manager.js index 090bf7d..b636085 100644 --- a/basicswap/static/js/modules/websocket-manager.js +++ b/basicswap/static/js/modules/websocket-manager.js @@ -315,24 +315,16 @@ const WebSocketManager = (function() { function handlePageHidden() { log('Page hidden'); state.isPageHidden = true; - stopHealthCheck(); - - if (ws && ws.readyState === WebSocket.OPEN) { - state.isIntentionallyClosed = true; - ws.close(1000, 'Page hidden'); - } } function handlePageVisible() { log('Page visible'); state.isPageHidden = false; - state.isIntentionallyClosed = false; const resumeFn = () => { if (!publicAPI.isConnected()) { publicAPI.connect(); } - startHealthCheck(); }; if (window.CleanupManager) {