diff --git a/lib/realtime.js b/lib/realtime.js index 5018d15..16795cf 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);