From 669a96174c7e544c9cf25b5a678934a9eff5a650 Mon Sep 17 00:00:00 2001 From: Kobe Date: Tue, 27 May 2025 16:52:30 +0200 Subject: [PATCH] Revert "Update conversation.html" This reverts commit d76bee84f945d92b42209019ede8deab4b3d96dd. --- templates/conversations/conversation.html | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/templates/conversations/conversation.html b/templates/conversations/conversation.html index 518cbeb..234f5c4 100644 --- a/templates/conversations/conversation.html +++ b/templates/conversations/conversation.html @@ -407,16 +407,16 @@ if (typeof window.ChatManager === 'undefined') { transports: ['polling', 'websocket'], upgrade: true, reconnection: true, - reconnectionAttempts: 5, + reconnectionAttempts: Infinity, reconnectionDelay: 1000, reconnectionDelayMax: 5000, - timeout: 10000, - autoConnect: false, // Don't connect automatically + timeout: 20000, + autoConnect: true, forceNew: true, multiplex: false, - pingTimeout: 30000, - pingInterval: 10000, - upgradeTimeout: 5000, + pingTimeout: 60000, + pingInterval: 25000, + upgradeTimeout: 10000, rememberUpgrade: true, rejectUnauthorized: false, extraHeaders: { @@ -446,12 +446,6 @@ if (typeof window.ChatManager === 'undefined') { state.connectionState.hasJoined = true; }); - // Connect only when the page is fully loaded - $(window).on('load', function() { - console.log('Page loaded, connecting socket...'); - socket.connect(); - }); - socket.on('disconnect', function(reason) { console.log('Disconnected from conversation:', { reason: reason,