From 1df5b4ce4956b3e08a42e17b10dd86efd9a503ab Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 2 Jul 2016 16:13:34 +0800 Subject: Fix retryOnDisconnect and timer not clean up after reconnected --- public/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index b9ab7175..38882949 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2105,11 +2105,11 @@ socket.on('reconnect', function (data) { emitUserStatus(true); cursorActivity(); socket.emit('online users'); +}); +socket.on('connect', function (data) { clearInterval(retryTimer); retryTimer = null; retryOnDisconnect = false; -}); -socket.on('connect', function (data) { personalInfo['id'] = socket.id; showStatus(statusType.connected); socket.emit('version'); -- cgit v1.2.3