Reconnect to current channel after disconnect
This commit is contained in:
parent
f7d73a6ef2
commit
7740643421
|
|
@ -357,7 +357,11 @@
|
|||
// Use faster retry (2s) if never connected, slower (3s) if disconnected after connecting
|
||||
if (M.wantSync) {
|
||||
const delay = wasConnected ? 3000 : 2000;
|
||||
setTimeout(() => M.connectChannel(id), delay);
|
||||
setTimeout(() => {
|
||||
if (M.ws) return;
|
||||
const reconnectId = M.currentChannelId || M.getSavedChannelId() || id;
|
||||
M.connectChannel(reconnectId);
|
||||
}, delay);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue