diff --git a/node/handler/PadMessageHandler.js b/node/handler/PadMessageHandler.js index 5dccafc5..79b80483 100644 --- a/node/handler/PadMessageHandler.js +++ b/node/handler/PadMessageHandler.js @@ -136,7 +136,7 @@ exports.handleDisconnect = function(client) { if(pad2sessions[sessionPad][i] == client.id) { - pad2sessions[sessionPad].splice(i, 1); + delete pad2sessions[sessionPad][i]; break; } } @@ -190,10 +190,10 @@ exports.handleMessage = function(client, message) { handleSuggestUserName(client, message); } - //if the message type is unkown, throw an exception + //if the message type is unknown, throw an exception else { - messageLogger.warn("Dropped message, unkown Message Type " + message.type + ": " + JSON.stringify(message)); + messageLogger.warn("Dropped message, unknown Message Type " + message.type); } } @@ -600,22 +600,22 @@ function handleClientReady(client, message) //check if all ok if(!message.token) { - messageLogger.warn("Dropped message, CLIENT_READY message has no token!"); + messageLogger.warn("Dropped message, CLIENT_READY Message has no token!"); return; } if(!message.padId) { - messageLogger.warn("Dropped message, CLIENT_READY message has no padId!"); + messageLogger.warn("Dropped message, CLIENT_READY Message has no padId!"); return; } if(!message.protocolVersion) { - messageLogger.warn("Dropped message, CLIENT_READY message has no protocolVersion!"); + messageLogger.warn("Dropped message, CLIENT_READY Message has no protocolVersion!"); return; } if(message.protocolVersion != 2) { - messageLogger.warn("Dropped message, CLIENT_READY message has an unkown protocolVersion '" + message.protocolVersion + "'!"); + messageLogger.warn("Dropped message, CLIENT_READY Message has a unknown protocolVersion '" + message.protocolVersion + "'!"); return; } diff --git a/node/handler/SocketIORouter.js b/node/handler/SocketIORouter.js index 2d8f4f44..00e3e4f3 100644 --- a/node/handler/SocketIORouter.js +++ b/node/handler/SocketIORouter.js @@ -128,7 +128,7 @@ exports.setSocketIO = function(_socket) //drop message else { - messageLogger.warn("Droped message cause of bad permissions:" + stringifyWithoutPassword(message)); + messageLogger.warn("Dropped message cause of bad permissions:" + stringifyWithoutPassword(message)); } } }); diff --git a/node/handler/TimesliderMessageHandler.js b/node/handler/TimesliderMessageHandler.js index fa272cc9..86864977 100644 --- a/node/handler/TimesliderMessageHandler.js +++ b/node/handler/TimesliderMessageHandler.js @@ -77,7 +77,7 @@ exports.handleMessage = function(client, message) //if the message type is unkown, throw an exception else { - messageLogger.warn("Dropped message, unkown Message Type: '" + message.type + "'"); + messageLogger.warn("Dropped message, unknown Message Type: '" + message.type + "'"); } }