Commit 849e962a authored by konovalovsergey's avatar konovalovsergey Committed by Alexander.Trofimov

add shutdown script

parent 497a7fae
"use strict"; "use strict";
(function(window, undefined) { (function(window, undefined) {
'use strict'; 'use strict';
...@@ -1276,7 +1276,7 @@ ...@@ -1276,7 +1276,7 @@
} }
} }
t._state = ConnectionState.Reconnect; t._state = ConnectionState.Reconnect;
var bIsDisconnectAtAll = t.attemptCount >= t.maxAttemptCount; var bIsDisconnectAtAll = (4001 === evt.code || t.attemptCount >= t.maxAttemptCount);
if (bIsDisconnectAtAll) { if (bIsDisconnectAtAll) {
t._state = ConnectionState.ClosedAll; t._state = ConnectionState.ClosedAll;
} }
...@@ -1284,7 +1284,7 @@ ...@@ -1284,7 +1284,7 @@
t.onDisconnect(evt.reason, bIsDisconnectAtAll, t.isCloseCoAuthoring); t.onDisconnect(evt.reason, bIsDisconnectAtAll, t.isCloseCoAuthoring);
} }
//Try reconect //Try reconect
if (t.attemptCount < t.maxAttemptCount) { if (!bIsDisconnectAtAll) {
t._tryReconnect(); t._tryReconnect();
} }
}; };
......
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