Add further checks to make sure sessioninfos[sessionID] is !== undefined

pull/458/head
Matthias Bartelmeß 2012-02-16 23:35:00 +01:00
parent bad920e28d
commit 97b7f0707f
1 changed files with 3 additions and 1 deletions

View File

@ -887,7 +887,9 @@ function handleClientReady(client, message)
function (callback)
{
//Jump over, if this session is the connection session
if(sessionID != client.id && socketio.sockets.sockets[sessionID] !== undefined)
if(sessionID != client.id &&
socketio.sockets.sockets[sessionID] !== undefined &&
sessioninfos[sessionID] !== undefined)
{
//Send this Session the Notification about the new user
socketio.sockets.sockets[sessionID].json.send(messageToTheOtherUsers);