From 70a536cad15c57316ca0012144788a01aa3b4ad1 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sun, 28 Apr 2024 12:55:32 +0200 Subject: [PATCH] Fixed timeout when idling. --- src/static/js/pad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index e75f755c5..ef13312a5 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -251,7 +251,7 @@ const handshake = async () => { // The socket.io client will automatically try to reconnect for all reasons other than "io // server disconnect". console.log(`Socket disconnected: ${reason}`) - if (reason !== 'io server disconnect' && reason !== 'ping timeout') return; + if (reason !== 'io server disconnect' || reason !== 'ping timeout') return; socketReconnecting(); socket.connect(); });