mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 06:03:34 +01:00
Fixed silent disconnect of Etherpad
This commit is contained in:
parent
404ffde232
commit
f9156dd47c
1 changed files with 5 additions and 1 deletions
|
@ -251,7 +251,11 @@ const handshake = async () => {
|
|||
// The socket.io client will automatically try to reconnect for all reasons other than "io
|
||||
// server disconnect".
|
||||
console.log(`Socket disconnected: ${reason}`)
|
||||
if (reason !== 'io server disconnect' || reason !== 'ping timeout') return;
|
||||
if (!reason.includes("close") && !reason.includes("transport error")) {
|
||||
console.error("Unknown socket disconnect", reason)
|
||||
return;
|
||||
}
|
||||
console.log("Reconnecting")
|
||||
socketReconnecting();
|
||||
socket.connect();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue