feat: Reconnect logic (#9453)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
Sivin Varghese
2024-06-03 15:54:19 +05:30
committed by GitHub
parent 00da2ac847
commit af90f21cfd
19 changed files with 774 additions and 93 deletions

View File

@@ -1,6 +1,4 @@
import { createConsumer } from '@rails/actioncable';
import { BUS_EVENTS } from 'shared/constants/busEvents';
import { emitter } from 'shared/helpers/mitt';
const PRESENCE_INTERVAL = 20000;
const RECONNECT_INTERVAL = 1000;
@@ -28,8 +26,6 @@ class BaseActionCableConnector {
BaseActionCableConnector.isDisconnected = true;
this.onDisconnected();
this.initReconnectTimer();
// TODO: Remove this after completing the conversation list refetching
emitter.emit(BUS_EVENTS.WEBSOCKET_DISCONNECT);
},
}
);