Change logging of URL to be compatible with both old and new versions
of ws
This commit is contained in:
parent
3e17187216
commit
141ba0088e
|
@ -28,7 +28,7 @@ var argv = require('optimist').argv,
|
|||
// Handle new WebSocket client
|
||||
new_client = function(client, req) {
|
||||
var clientAddr = client._socket.remoteAddress, log;
|
||||
console.log(req.url);
|
||||
console.log(req ? req.url : client.upgradeReq.url);
|
||||
log = function (msg) {
|
||||
console.log(' ' + clientAddr + ': '+ msg);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue