Skip to content

Commit

Permalink
HOTFIX for Node v.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robotconscience committed Feb 21, 2015
1 parent 75874c6 commit 9da5211
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spacebrew.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,9 @@ spacebrew.createServer = function( opts ){

var getClientAddress = function(connection){
try{
return connection._socket._handle.getpeername().address; //connection.upgradeReq.headers.host;
var out = {};
connection._socket._handle.getpeername(out);
return out.address; //connection.upgradeReq.headers.host;
} catch (e){}
logger.log("info", "[printAllTrustedClients] unable to access remote address");
return "unknown";
Expand Down

0 comments on commit 9da5211

Please sign in to comment.