From 4eee89ad12db2abdd1525f00c9a15b3e3d722fa5 Mon Sep 17 00:00:00 2001 From: luto Date: Sat, 22 Nov 2014 16:39:42 +0100 Subject: fix api mystery crash --- src/node/handler/PadMessageHandler.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/node/handler/PadMessageHandler.js') diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index e1ac994e..c65b5451 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -93,6 +93,9 @@ exports.handleConnect = function(client) */ exports.kickSessionsFromPad = function(padID) { + if(typeof socketio.sockets['clients'] !== 'function') + return; + //skip if there is nobody on this pad if(socketio.sockets.clients(padID).length == 0) return; -- cgit v1.2.3