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(); } }