From 21e3026f048d4d834be9a53b1ecf31e890dcfaac Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 11 Jul 2019 23:05:38 -0400 Subject: [PATCH] heartbeat --- src/services/notifications.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/notifications.service.ts b/src/services/notifications.service.ts index d88d9124a41..29f1ed5d191 100644 --- a/src/services/notifications.service.ts +++ b/src/services/notifications.service.ts @@ -46,6 +46,7 @@ export class NotificationsService implements NotificationsServiceAbstraction { if (this.signalrConnection != null) { this.signalrConnection.off('ReceiveMessage'); + this.signalrConnection.off('Heartbeat'); await this.signalrConnection.stop(); this.connected = false; this.signalrConnection = null; @@ -61,6 +62,8 @@ export class NotificationsService implements NotificationsServiceAbstraction { this.signalrConnection.on('ReceiveMessage', (data: any) => this.processNotification(new NotificationResponse(data))); + this.signalrConnection.on('Heartbeat', + (data: any) => { /*console.log('Heartbeat!');*/ }); this.signalrConnection.onclose(() => { this.connected = false; this.reconnect(true);