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
|
* 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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue