Ability to reconnect after a connection failure
This commit is contained in:
1 parent
5a3da11c40
commit
c168ce2d1c
3 files changed
+25
-3
No files matched your search
+10
-1
@@ -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