From 3c81837aea34292a91dbcd7acf6d36fae9d93985 Mon Sep 17 00:00:00 2001 From: Alex White Date: Thu, 2 May 2024 20:42:10 +0100 Subject: [PATCH] added undefined check for disconnect websockets --- Projects/Network/SA/Modules/WebSocketsNetworkClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js index f7f29b6e3a..4f0866ed28 100644 --- a/Projects/Network/SA/Modules/WebSocketsNetworkClient.js +++ b/Projects/Network/SA/Modules/WebSocketsNetworkClient.js @@ -95,7 +95,7 @@ exports.newNetworkModulesWebSocketsNetworkClient = function newNetworkModulesWeb } clearTimeout(socket.pingTimeout) - if (thisObject.socketNetworkClients.isConnected === true) { + if (thisObject.socketNetworkClients !== undefined && thisObject.socketNetworkClients.isConnected === true) { SA.logger.info('') SA.logger.info('Websockets Client Disconnected from Network Node via Web Sockets ............. Disconnected from ' + connectionInfo()) SA.logger.info('')