handle reconnection attempts
This commit is contained in:
parent
b07248ad42
commit
73d4fd1700
@ -379,6 +379,17 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
// TODO onConnectionStateChange
|
// TODO onConnectionStateChange
|
||||||
|
var onConnectionChange = config.onConnectionChange = function (info) {
|
||||||
|
setEditable(info.state);
|
||||||
|
toolbar.failed();
|
||||||
|
if (info.state) {
|
||||||
|
initializing = true;
|
||||||
|
toolbar.reconnecting(info.myId);
|
||||||
|
Cryptpad.findOKButton().click();
|
||||||
|
} else {
|
||||||
|
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var rt = Realtime.start(config);
|
var rt = Realtime.start(config);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user