mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Handle socketio errors properly
This commit is contained in:
parent
fb20c26c5f
commit
4265f4175e
2 changed files with 7 additions and 1 deletions
|
@ -662,7 +662,8 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
||||||
getMissedChanges: getMissedChanges,
|
getMissedChanges: getMissedChanges,
|
||||||
callWhenNotCommitting: callWhenNotCommitting,
|
callWhenNotCommitting: callWhenNotCommitting,
|
||||||
addHistoricalAuthors: tellAceAboutHistoricalAuthors,
|
addHistoricalAuthors: tellAceAboutHistoricalAuthors,
|
||||||
setChannelState: setChannelState
|
setChannelState: setChannelState,
|
||||||
|
setStateIdle: setStateIdle
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(setUpSocket);
|
$(document).ready(setUpSocket);
|
||||||
|
|
|
@ -221,6 +221,11 @@ function handshake()
|
||||||
pad.collabClient.setChannelState("DISCONNECTED", "reconnect_timeout");
|
pad.collabClient.setChannelState("DISCONNECTED", "reconnect_timeout");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on('error', function(error) {
|
||||||
|
socket.realConnected = false;
|
||||||
|
pad.collabClient.setStateIdle();
|
||||||
|
});
|
||||||
|
|
||||||
var initalized = false;
|
var initalized = false;
|
||||||
|
|
||||||
socket.on('message', function(obj)
|
socket.on('message', function(obj)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue