From c0fd5f71f8e2cf36165c565b4967ac0e379f166f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 24 Aug 2018 15:21:28 -0400 Subject: [PATCH] always set inactive state first --- src/services/notifications.service.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/services/notifications.service.ts b/src/services/notifications.service.ts index d2aad1b6325..04be09e021d 100644 --- a/src/services/notifications.service.ts +++ b/src/services/notifications.service.ts @@ -88,21 +88,15 @@ export class NotificationsService implements NotificationsServiceAbstraction { } async reconnectFromActivity(): Promise { - if (!this.inited) { - return; - } this.inactive = false; - if (!this.connected) { + if (this.inited && !this.connected) { await this.reconnect(true); } } async disconnectFromInactivity(): Promise { - if (!this.inited) { - return; - } this.inactive = true; - if (this.connected) { + if (this.inited && this.connected) { await this.signalrConnection.stop(); } }