mirror of https://github.com/calzoneman/sync.git
Fix IP extraction for socket.io
This commit is contained in:
parent
6e0735f3fe
commit
50dd0982a4
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue