Skip to content

Commit

Permalink
chore: lintfix
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
amydevs committed Oct 18, 2023
1 parent 4c71b04 commit 4ffa053
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/MDNS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ class MDNS {
const networkAddresses = networkInterfaces[networkInterfaceName];
if (networkAddresses == null) continue;
for (const networkAddress of networkAddresses) {
if (networkAddress.internal && networkAddress.family === 'IPv6') continue;
if (networkAddress.internal && networkAddress.family === 'IPv6') {
continue;
}
const { address, family, netmask } = networkAddress;
if (ipv6Only) {
if (family !== 'IPv6') continue;
Expand Down Expand Up @@ -667,9 +669,8 @@ class MDNS {
}),
);
}
}
else if (utils.isIPv4MappedIPv6(rinfo.address)) {
// if the message is received unicast socket, rinfo.address maybe an IPv4MappedIPv6 address, as the unicast address is bound on the '::'
} else if (utils.isIPv4MappedIPv6(rinfo.address)) {
// If the message is received unicast socket, rinfo.address maybe an IPv4MappedIPv6 address, as the unicast address is bound on the '::'
rinfo.address = utils.fromIPv4MappedIPv6(rinfo.address);
}

Expand Down

0 comments on commit 4ffa053

Please sign in to comment.