add rtmt log

This commit is contained in:
Halit Aksoy 2022-09-07 21:08:51 +03:00
parent 63037ec02d
commit 2818749b58

View File

@ -83,6 +83,7 @@ export class RTMTWS extends EventEmitter2 implements RTMT {
clearTimeout(this.pingTimeout); clearTimeout(this.pingTimeout);
this.pingTimeout = setTimeout(() => { this.pingTimeout = setTimeout(() => {
if (!this.webSocket) return; if (!this.webSocket) return;
console.log("(RTMT) WebSocket self closed");
this.webSocket.close(); this.webSocket.close();
this.onWebSocketClose(this.webSocket); this.onWebSocketClose(this.webSocket);
}, RTMT_WS_PING_INTERVAL + RTMT_WS_PING_INTERVAL_BUFFER_TIME); }, RTMT_WS_PING_INTERVAL + RTMT_WS_PING_INTERVAL_BUFFER_TIME);