Ability to reconnect after a connection failure

This commit is contained in:
yflory
2016-08-25 17:56:17 +02:00
parent 5a3da11c40
commit c168ce2d1c
3 changed files with 25 additions and 3 deletions

View File

@@ -603,6 +603,18 @@ define([
Cryptpad.alert(Messages.disconnectAlert);
};
var onConnectionChange = realtimeOptions.onConnectionChange = function (info) {
setEditable(info.state);
toolbar.failed();
if (info.state) {
initializing = true;
toolbar.reconnecting(info.myId);
Cryptpad.findOKButton().click();
} else {
Cryptpad.alert(Messages.disconnectAlert);
}
};
var onLocal = realtimeOptions.onLocal = function () {
if (initializing) { return; }