Commit e071e6de authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Переподсоединяемся каждые 2 секунды. Для этого есть 50 попыток.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57032 954022d7-b5bf-4e40-9824-e11837661b57
parent f6aacbd9
...@@ -292,6 +292,8 @@ ...@@ -292,6 +292,8 @@
this.reconnectTimeout = null; this.reconnectTimeout = null;
this.attemptCount = 0; this.attemptCount = 0;
this.maxAttemptCount = 50;
this.reconnectInterval = 2000;
this._docid = null; this._docid = null;
this._token = null; this._token = null;
...@@ -901,7 +903,7 @@ ...@@ -901,7 +903,7 @@
}; };
sockjs.onclose = function (evt) { sockjs.onclose = function (evt) {
t._state = -1; // Reconnect state t._state = -1; // Reconnect state
var bIsDisconnectAtAll = t.attemptCount >= 20 || t.isCloseCoAuthoring; var bIsDisconnectAtAll = t.attemptCount >= t.maxAttemptCount || t.isCloseCoAuthoring;
if (bIsDisconnectAtAll) if (bIsDisconnectAtAll)
t._state = 3; // Closed state t._state = 3; // Closed state
if (t.onDisconnect) { if (t.onDisconnect) {
...@@ -910,7 +912,7 @@ ...@@ -910,7 +912,7 @@
if (t.isCloseCoAuthoring) if (t.isCloseCoAuthoring)
return; return;
//Try reconect //Try reconect
if (t.attemptCount < 20) { if (t.attemptCount < t.maxAttemptCount) {
t._tryReconnect(); t._tryReconnect();
} }
}; };
...@@ -927,7 +929,7 @@ ...@@ -927,7 +929,7 @@
this.reconnectTimeout = setTimeout(function () { this.reconnectTimeout = setTimeout(function () {
delete t.sockjs; delete t.sockjs;
t._initSocksJs(); t._initSocksJs();
}, 500 * t.attemptCount); }, this.reconnectInterval);
}; };
......
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