Optimistically call restart_get_updates on Socket reconnect.

(imported from commit 0804969f964e65ed2d2e0a64d56d5f591d12e0ef)
This commit is contained in:
Tim Abbott 2014-01-14 13:36:13 -05:00
parent 2ebb962114
commit 7e301425fc
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ Socket.prototype = {
var that = this;
sockjs.onopen = function Socket__sockjs_onopen() {
blueslip.info("Socket connected [transport=" + sockjs.protocol + "]");
if (that._reconnect_initiation_time !== null) {
// If this is a reconnect, network was probably
// recently interrupted, so we optimistically restart
// get_updates
restart_get_updates();
}
that._is_open = true;
// Notify listeners that we've finished the websocket handshake