diff options
| author | Wu Cheng-Han | 2016-07-02 16:13:34 +0800 |
|---|---|---|
| committer | Wu Cheng-Han | 2016-07-02 16:13:34 +0800 |
| commit | 1df5b4ce4956b3e08a42e17b10dd86efd9a503ab (patch) | |
| tree | 7ac90cb0f7eb4b8cd70f6a3a455e44b63de103de | |
| parent | 858b30c20c5ce555ab023d69bad24d548cdcbc4e (diff) | |
Fix retryOnDisconnect and timer not clean up after reconnected
| -rw-r--r-- | public/js/index.js | 4 |
1 files 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'); |
