Made the router a little safer.

pull/35/head
Hans Pinckaers 2011-06-21 21:19:48 +02:00
parent 6e09517d55
commit 74b96aa774
1 changed files with 6 additions and 1 deletions

View File

@ -63,8 +63,13 @@ exports.setSocketIO = function(_socket)
{
console.error(message);
//check if component is registered in the components array
if(components[message.component])
{
components[message.component].handleMessage(client, message);
}
}
else
{
throw "Can't route the message:" + JSON.stringify(message);