fix websocket reconnection

This commit is contained in:
Thibault Duplessis 2012-06-03 00:15:55 +02:00
parent 0126a22451
commit a4d584ccd9
2 changed files with 2 additions and 4 deletions

View file

@ -49,10 +49,11 @@ $.websocket.prototype = {
})
.bind('close', function() {
self._debug("disconnected");
if (self.options.offlineDelay && !self.offlineTimeout) self.offlineTimeout = setTimeout(function() {
if (self.options.offlineDelay) self.offlineTimeout = setTimeout(function() {
if (self.options.offlineTag) self.options.offlineTag.show();
}, self.options.offlineDelay);
self.settings.close();
self._keepAlive();
})
.bind('message', function(e){
var m = JSON.parse(e.originalEvent.data);
@ -85,7 +86,6 @@ $.websocket.prototype = {
self.connect();
}, self.options.pingTimeout);
} catch (e) {
throw e;
self._debug(e);
self.connect();
}

2
todo
View file

@ -28,9 +28,7 @@ new elo system http://en.wikipedia.org/wiki/Glicko_rating_system
spectator chat!
guess friend list
star people and games (and forum threads?)
check in-game chat scroll
autoclose top menus
check websocket reconnection
new translations:
-rematchOfferCanceled=Rematch offer canceled