mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-12 14:05:27 +00:00
Ensure happy-eyeballs uses supervisor dns lookup
Happy-eyeballs performs [dns lookups](https://github.com/balena-io-modules/happy-eyeballs/blob/master/src/happy-eyeballs.ts#L23) for the requested addresses, however, because of the order of imports it was not using the supervisor custom `dns.lookup` that handles `.local` name resolution, making address resolution fail in those cases. Moving the import after the `dns.lookup` patch fixes the problem.
This commit is contained in:
parent
39c667803d
commit
08147e6a86
@ -1,6 +1,5 @@
|
|||||||
import { NOTFOUND } from 'dns';
|
import { NOTFOUND } from 'dns';
|
||||||
import * as mdnsResolver from 'mdns-resolver';
|
import * as mdnsResolver from 'mdns-resolver';
|
||||||
import '@balena/happy-eyeballs/eye-patch';
|
|
||||||
|
|
||||||
class DnsLookupError extends Error {
|
class DnsLookupError extends Error {
|
||||||
public constructor(public code: string = NOTFOUND) {
|
public constructor(public code: string = NOTFOUND) {
|
||||||
@ -118,6 +117,7 @@ interface DnsLookupOpts {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
import '@balena/happy-eyeballs/eye-patch';
|
||||||
import Supervisor from './supervisor';
|
import Supervisor from './supervisor';
|
||||||
|
|
||||||
const supervisor = new Supervisor();
|
const supervisor = new Supervisor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user