mirror of https://github.com/zulip/zulip.git
Optimistically call restart_get_updates on Socket reconnect.
(imported from commit 0804969f964e65ed2d2e0a64d56d5f591d12e0ef)
This commit is contained in:
parent
2ebb962114
commit
7e301425fc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue