mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -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,
|
||||
callWhenNotCommitting: callWhenNotCommitting,
|
||||
addHistoricalAuthors: tellAceAboutHistoricalAuthors,
|
||||
setChannelState: setChannelState
|
||||
setChannelState: setChannelState,
|
||||
setStateIdle: setStateIdle
|
||||
};
|
||||
|
||||
$(document).ready(setUpSocket);
|
||||
|
|
|
@ -221,6 +221,11 @@ function handshake()
|
|||
pad.collabClient.setChannelState("DISCONNECTED", "reconnect_timeout");
|
||||
});
|
||||
|
||||
socket.on('error', function(error) {
|
||||
socket.realConnected = false;
|
||||
pad.collabClient.setStateIdle();
|
||||
});
|
||||
|
||||
var initalized = false;
|
||||
|
||||
socket.on('message', function(obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue