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

View file

@ -58,7 +58,7 @@ exports.setSocketIO = function(_socket)
client.on('message', function(message) 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)); console.error("Protocolversion header is not correct:" + JSON.stringify(message));
return; return;