From 3e53b3030512f9b97fda11fcf14773afff3bc7ca Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 20 Aug 2014 11:44:37 -0500 Subject: [PATCH] Fix IP extraction for socket.io --- lib/io/ioserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/io/ioserver.js b/lib/io/ioserver.js index bde1e93b..72ef6ff8 100644 --- a/lib/io/ioserver.js +++ b/lib/io/ioserver.js @@ -126,7 +126,7 @@ function addTypecheckedFunctions(sock) { * Called after a connection is accepted */ function handleConnection(sock) { - var ip = sock.handshake.address.address; + var ip = sock.request.connection.remoteAddress; if (net.isIPv6(ip)) { ip = util.expandIPv6(ip); }