From b78a0e1ebf16bb4f72a3bb03d8266c554e2697fd Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Tue, 21 Jul 2020 10:00:11 -0400 Subject: [PATCH] Remove webapp custom keepalive --- .../rdio-scanner/rdio-scanner.service.ts | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/client/src/app/components/rdio-scanner/rdio-scanner.service.ts b/client/src/app/components/rdio-scanner/rdio-scanner.service.ts index 00d99d8..0b01562 100644 --- a/client/src/app/components/rdio-scanner/rdio-scanner.service.ts +++ b/client/src/app/components/rdio-scanner/rdio-scanner.service.ts @@ -84,7 +84,6 @@ export class AppRdioScannerService implements OnDestroy { private skipDelay: number | undefined; private webSocket: WebSocket | undefined; - private webSocketHeartBeat = 30 * 1000; private webSocketInterval: number | undefined; private webSocketTimeout: number | undefined; private webSocketPendingMessage = false; @@ -632,8 +631,6 @@ export class AppRdioScannerService implements OnDestroy { } if (Array.isArray(message)) { - this.webSocketKeepAlive(); - this.webSocketPendingMessage = false; switch (message[0]) { @@ -735,25 +732,6 @@ export class AppRdioScannerService implements OnDestroy { this.webSocketInterval = undefined; } - - } - - private webSocketKeepAlive(): void { - if (this.webSocketTimeout) { - clearTimeout(this.webSocketTimeout); - - this.webSocketTimeout = undefined; - } - - if (this.webSocketInterval) { - clearInterval(this.webSocketInterval); - } - - this.webSocketInterval = setInterval(() => { - this.webSocketSend(WebSocketCommand.Nop); - - this.webSocketTimeout = setTimeout(() => this.webSocketReconnect(), 10 * 1000); - }, this.webSocketHeartBeat); } private webSocketOpen(): void { @@ -770,8 +748,6 @@ export class AppRdioScannerService implements OnDestroy { this.webSocket.onmessage = (ev: MessageEvent) => this.messageParser(ev.data); } - this.webSocketKeepAlive(); - this.webSocketSend(WebSocketCommand.Config); }; }