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