Fix IP extraction for socket.io

This commit is contained in:
calzoneman 2014-08-20 11:44:37 -05:00
parent 6e0735f3fe
commit 50dd0982a4
1 changed files with 1 additions and 2 deletions

View File

@ -126,8 +126,7 @@ function addTypecheckedFunctions(sock) {
* Called after a connection is accepted * Called after a connection is accepted
*/ */
function handleConnection(sock) { function handleConnection(sock) {
var ip = sock.handshake.address.address; var ip = sock.request.connection.remoteAddress;
var sockUser = sock.handshake.user;
if (net.isIPv6(ip)) { if (net.isIPv6(ip)) {
ip = util.expandIPv6(ip); ip = util.expandIPv6(ip);
} }