feat(): safer websocket timer cleanup
This commit is contained in:
@@ -808,11 +808,11 @@ export class WebsocketClient extends EventEmitter {
|
||||
|
||||
const wasOpen = this.wsStore.isWsOpen(wsKey);
|
||||
|
||||
this.getWs(wsKey)?.terminate();
|
||||
delete this.wsStore.get(wsKey, true).activePongTimer;
|
||||
this.clearPingTimer(wsKey);
|
||||
this.clearPongTimer(wsKey);
|
||||
|
||||
this.getWs(wsKey)?.terminate();
|
||||
|
||||
if (!wasOpen) {
|
||||
this.logger.info(
|
||||
`${reason} - socket already closed - trigger immediate reconnect`,
|
||||
|
||||
Reference in New Issue
Block a user