From 7c6c330b02a7eab5b5eeef1c773555b859fe738a Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 29 Sep 2020 20:52:32 +0700 Subject: [PATCH] Bugfix: Websocket data push stopped working on disconnect, bug caused by 3dedf1e3 --- frontend/src/app/services/websocket.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/services/websocket.service.ts b/frontend/src/app/services/websocket.service.ts index ca4c6cc89..a3d8b9145 100644 --- a/frontend/src/app/services/websocket.service.ts +++ b/frontend/src/app/services/websocket.service.ts @@ -158,7 +158,7 @@ export class WebsocketService { if (this.goneOffline === true) { this.goneOffline = false; if (this.lastWant) { - this.want(this.lastWant); + this.want(this.lastWant, true); } this.stateService.connectionState$.next(2); } @@ -217,8 +217,8 @@ export class WebsocketService { this.websocketSubject.next({ historicalDate }); } - want(data: string[]) { - if (data === this.lastWant) { + want(data: string[], force = false) { + if (data === this.lastWant && !force) { return; } this.websocketSubject.next({action: 'want', data: data});