diff --git a/lib/client.js b/lib/client.js index 162513a..0a9285f 100644 --- a/lib/client.js +++ b/lib/client.js @@ -40,14 +40,14 @@ function connect(){ } if(!client.port){ - server.log('Connecting client on Unix Socket :'.debug, client.path.variable); + client.log('Connecting client on Unix Socket :'.debug, client.path.variable); client.socket = net.connect( { path:client.path } ); }else{ - server.log('Connecting client via TCP to'.debug, client.path.variable ,client.port); + client.log('Connecting client via TCP to'.debug, client.path.variable ,client.port); client.socket = net.connect( { port:client.port, @@ -111,4 +111,4 @@ function connect(){ ); } -module.exports=init; \ No newline at end of file +module.exports=init; diff --git a/lib/socketServer.js b/lib/socketServer.js index 12c9f28..9ceb810 100644 --- a/lib/socketServer.js +++ b/lib/socketServer.js @@ -187,6 +187,8 @@ function init(path,config,log,port){ socket.on( 'message', function(msg,rinfo) { + if (!rinfo) + return; server.log('Received UDP message from '.debug, rinfo.address.variable, rinfo.port); socket.emit('data',msg.toString(),rinfo); } @@ -309,4 +311,4 @@ function init(path,config,log,port){ return server; } -module.exports=init; \ No newline at end of file +module.exports=init;