Check only Protocolversion of messages that have one

This commit is contained in:
Peter 'Pita' Martischka 2011-06-27 23:12:46 +02:00
parent a4b9427896
commit b8c1d0b8bd
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ exports.setSocketIO = function(_socket)
client.on('message', function(message)
{
if(!message.protocolVersion|| message.protocolVersion != 2)
if(message.protocolVersion && message.protocolVersion != 2)
{
console.error("Protocolversion header is not correct:" + JSON.stringify(message));
return;