Ability to reconnect after a connection failure
This commit is contained in:
@@ -74,10 +74,19 @@ define([
|
||||
};
|
||||
|
||||
var onAbort = config.onAbort = function (info) {
|
||||
$textarea.attr('disabled', true);
|
||||
setEditable(false);
|
||||
window.alert("Server Connection Lost");
|
||||
};
|
||||
|
||||
var onConnectionChange = config.onConnectionChange = function (info) {
|
||||
if (info.state) {
|
||||
initializing = true;
|
||||
} else {
|
||||
setEditable(false);
|
||||
window.alert("Server Connection Lost. Trying to reconnect...");
|
||||
}
|
||||
};
|
||||
|
||||
var rt = Realtime.start(config);
|
||||
|
||||
['cut', 'paste', 'change', 'keyup', 'keydown', 'select', 'textInput']
|
||||
|
||||
Reference in New Issue
Block a user