lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit be8040e3 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add _reconnect function to DocsCoApi

parent ce044466
...@@ -1666,19 +1666,21 @@ ...@@ -1666,19 +1666,21 @@
this._tryReconnect(); this._tryReconnect();
} }
}; };
DocsCoApi.prototype._tryReconnect = function() { DocsCoApi.prototype._reconnect = function () {
var t = this; delete this.sockjs;
if (this.reconnectTimeout) { this._initSocksJs();
clearTimeout(this.reconnectTimeout); };
t.reconnectTimeout = null; DocsCoApi.prototype._tryReconnect = function () {
} var t = this;
++this.attemptCount; if (this.reconnectTimeout) {
this.reconnectTimeout = setTimeout(function() { clearTimeout(this.reconnectTimeout);
delete t.sockjs; t.reconnectTimeout = null;
t._initSocksJs(); }
}, this.reconnectInterval); ++this.attemptCount;
this.reconnectTimeout = setTimeout(function () {
}; t._reconnect();
}, this.reconnectInterval);
};
DocsCoApi.prototype._getDisconnectErrorCode = function(opt_closeCode) { DocsCoApi.prototype._getDisconnectErrorCode = function(opt_closeCode) {
if (c_oCloseCode.serverShutdown === opt_closeCode) { if (c_oCloseCode.serverShutdown === opt_closeCode) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment