summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorluto <m@luto.at>2014-11-22 16:39:42 +0100
committerluto <m@luto.at>2014-11-22 16:46:37 +0100
commit4eee89ad12db2abdd1525f00c9a15b3e3d722fa5 (patch)
tree5272315b88062f5f8e9f72250498b7e115260d8e /src/node
parent3ebcaad31fc217e8ef77c940d414cb55ea99fa6d (diff)
downloadetherpad-lite-4eee89ad12db2abdd1525f00c9a15b3e3d722fa5.zip
fix api mystery crash
Diffstat (limited to 'src/node')
-rw-r--r--src/node/handler/PadMessageHandler.js3
1 files changed, 3 insertions, 0 deletions
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;