Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Jul 25, 2024
1 parent a4f7879 commit d25a5e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/helper/alt-ips-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ export const apiConnectAltIpsHandler = async ({ token, socketId, ip }: { token:
.flatten()
.uniqBy('address')
.filter(address => !address.internal)
.filter(address => !address.address.startsWith('fe80:'))
// .filter(address => !address.address.startsWith('fe80:'))
.filter(address => !address.address.startsWith('169.254.'))
.value();

const results = await Promise.allSettled(addresses.map(({ address, family }) => sendToken(address, family === 'IPv6' ? 6 : 4, token, socketId)));

results.forEach((result) => {
if (result.status === 'rejected') {
console.log(result.reason.response?.body);

Check failure on line 25 in src/helper/alt-ips-handler.ts

View workflow job for this annotation

GitHub Actions / Test code / Run tests (20.x)

Unsafe member access .response on an `any` value
logger.error(result.reason);
logger.error(result.reason instanceof RequestError ? result.reason.message : result);
} else {
allIps.push(result.value);
Expand Down

0 comments on commit d25a5e2

Please sign in to comment.