From 77add7d525c27467f0799f7b14317ce898f8d14a Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Tue, 30 Jun 2020 21:31:01 +0200 Subject: [PATCH] update Di 30. Jun 21:31:01 CEST 2020 --- server/waip.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/waip.js b/server/waip.js index b44e025..df527e2 100755 --- a/server/waip.js +++ b/server/waip.js @@ -312,10 +312,12 @@ module.exports = function (io, sql, fs, brk, async, app_cfg) { if (socket_ids) { socket_ids.forEach(function (row) { var socket = io.of('/waip').connected[row.socket_id]; - socket.emit('io.standby', null); - socket.emit('io.stopaudio', null); - sql.db_log('WAIP', 'Standby an Socket ' + socket.id + ' gesendet'); - sql.db_client_update_status(socket, null); + if (typeof socket !== 'undefined') { + socket.emit('io.standby', null); + socket.emit('io.stopaudio', null); + sql.db_log('WAIP', 'Standby an Socket ' + socket.id + ' gesendet'); + sql.db_client_update_status(socket, null); + }; }); }; });