Fix IP extraction for socket.io

This commit is contained in:
calzoneman 2014-08-20 11:44:37 -05:00
parent 6e0735f3fe
commit 50dd0982a4

View file

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