summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/realtime.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 5018d151..16795cf6 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -268,6 +268,7 @@ var isDisconnectBusy = false;
var disconnectSocketQueue = [];
function finishConnection(socket, note, user) {
+ if (!socket || !note || !user) return;
note.users[socket.id] = user;
note.socks.push(socket);
note.server.addClient(socket);