From ec40b61a189ad5a0f55c60756fa23b2d8c3a409e Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Thu, 14 Mar 2019 11:48:23 +0100 Subject: [PATCH] [fix] Cs+ notificaitons: Make sure to close websocket when user logout --- www/plugins/es/js/services/notification-services.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/plugins/es/js/services/notification-services.js b/www/plugins/es/js/services/notification-services.js index c74644cd..d7faaaed 100644 --- a/www/plugins/es/js/services/notification-services.js +++ b/www/plugins/es/js/services/notification-services.js @@ -317,6 +317,7 @@ angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es data.notifications.time = null; // Stop listening notification if (wsUserEventCloseFn) { + console.debug("[ES] [notification] Closing websocket..."); wsUserEventCloseFn(); wsUserEventCloseFn = null; } @@ -395,7 +396,7 @@ angular.module('cesium.es.notification.services', ['cesium.platform', 'cesium.es // And display such connectivity errors in UI UIUtils.alert.error('ACCOUNT.ERROR.WS_CONNECTION_FAILED'); }); - wsUserEventCloseFn = wsUserEvent.close; + wsUserEventCloseFn = function() {wsUserEvent.close();}; }); } -- GitLab