From 1424acc88e30a48e7563eb788ce936e348fc2cb5 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 19 Dec 2014 18:49:56 -0500 Subject: [PATCH] fix reconnection for socket.io 1.x --- public/src/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index 7cf640da72..0ee521a756 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -48,13 +48,12 @@ app.uid = null; socket.on('event:disconnect', function() { $(window).trigger('action:disconnected'); app.isConnected = false; - socket.socket.connect(); + socket.connect(); }); - socket.on('reconnecting', function (data, attempt) { + socket.on('reconnecting', function (attempt) { if(attempt === parseInt(config.maxReconnectionAttempts, 10)) { - socket.socket.reconnectionAttempts = 0; - socket.socket.reconnectionDelay = config.reconnectionDelay; + socket.io.attempts = 0; return; }