Merge pull request #2253 from balena-os/increase-auto-select-family-timeout

Increase the timeout for auto select family to 5000ms to avoid issues
This commit is contained in:
Page- 2024-03-25 15:24:27 +00:00 committed by GitHub
commit 3c1763c6a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,10 @@ import { set } from '@balena/es-version';
// Set the desired es version for downstream modules that support it, before we import any
set('es2019');
import { setDefaultAutoSelectFamilyAttemptTimeout } from 'net';
// Increase the timeout for the happy eyeballs algorithm to 5000ms to avoid issues on slower networks
setDefaultAutoSelectFamilyAttemptTimeout(5000);
import { NOTFOUND } from 'dns';
import mdnsResolver from 'mdns-resolver';