Make IPv4 and IPv6 localhost connections use the same room

This commit is contained in:
JBYoshi 2019-02-18 15:52:05 -06:00
parent 6de5e297d8
commit cd221881b6
No known key found for this signature in database
GPG key ID: 468C80811BCC9A6A

View file

@ -158,6 +158,10 @@ class Peer {
} else {
this.ip = request.connection.remoteAddress;
}
// IPv4 and IPv6 use different values to refer to localhost
if (this.ip == '::1' || this.ip == '::ffff:127.0.0.1') {
this.ip = '127.0.0.1';
}
}
_setPeerId(request) {