mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
fix: Silent disconnect of pad (#6498)
This commit is contained in:
parent
649b6ef8b9
commit
166724dc13
3 changed files with 9 additions and 9 deletions
|
@ -230,7 +230,7 @@ const handshake = async () => {
|
|||
sendClientReady(false);
|
||||
});
|
||||
|
||||
socket.on('reconnect', () => {
|
||||
socket.io.on('reconnect', () => {
|
||||
// pad.collabClient might be null if the hanshake failed (or it never got that far).
|
||||
if (pad.collabClient != null) {
|
||||
pad.collabClient.setChannelState('CONNECTED');
|
||||
|
@ -251,9 +251,8 @@ 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 !== 'io server disconnect' || reason !== 'ping timeout') return;
|
||||
socketReconnecting();
|
||||
socket.connect();
|
||||
});
|
||||
|
||||
|
||||
|
@ -271,9 +270,9 @@ const handshake = async () => {
|
|||
}
|
||||
})
|
||||
|
||||
socket.on('reconnecting', socketReconnecting);
|
||||
socket.io.on('reconnect_attempt', socketReconnecting);
|
||||
|
||||
socket.on('reconnect_failed', (error) => {
|
||||
socket.io.on('reconnect_failed', (error) => {
|
||||
// pad.collabClient might be null if the hanshake failed (or it never got that far).
|
||||
if (pad.collabClient != null) {
|
||||
pad.collabClient.setChannelState('DISCONNECTED', 'reconnect_timeout');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue