mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
socket: Log the reason the SockJS connection was lost
(imported from commit 069067f9f979e7255f97f4943d6513076b2706bd)
This commit is contained in:
committed by
Steve Howell
parent
b3a551f402
commit
1ed176b5ef
@@ -247,14 +247,15 @@ Socket.prototype = {
|
|||||||
}, 60000);
|
}, 60000);
|
||||||
};
|
};
|
||||||
|
|
||||||
sockjs.onclose = function Socket__sockjs_onclose() {
|
sockjs.onclose = function Socket__sockjs_onclose(event) {
|
||||||
if (that._is_unloading) {
|
if (that._is_unloading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// We've failed to handshake, but notify that the attempt finished
|
// We've failed to handshake, but notify that the attempt finished
|
||||||
$(document).trigger($.Event('websocket_postopen.zulip', {}));
|
$(document).trigger($.Event('websocket_postopen.zulip', {}));
|
||||||
|
|
||||||
blueslip.info("SockJS connection lost. Attempting to reconnect soon.");
|
blueslip.info("SockJS connection lost. Attempting to reconnect soon."
|
||||||
|
+ " (" + event.code.toString() + ", " + event.reason + ")");
|
||||||
that._connection_failures++;
|
that._connection_failures++;
|
||||||
that._is_reconnecting = false;
|
that._is_reconnecting = false;
|
||||||
that._try_to_reconnect(that._reconnect_wait_time());
|
that._try_to_reconnect(that._reconnect_wait_time());
|
||||||
|
|||||||
Reference in New Issue
Block a user