File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/common/src/lib/common Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3977,18 +3977,22 @@ export function maybeArrayToString<T>(maybeArr: T): T extends any[] ? string : T
39773977 return maybeArr ;
39783978}
39793979
3980+ type DNSOrder = 'ipv4first' | 'verbatim' ;
3981+
39803982/**
39813983 * Get the configured DNS resolution order
39823984 */
3983- function getDNSResolutionOrder ( ) : 'ipv4first' | 'verbatim' {
3984- let dnsOrder : 'ipv4first' | 'verbatim' = 'ipv4first' ;
3985+ function getDNSResolutionOrder ( ) : DNSOrder {
3986+ let dnsOrder : DNSOrder = 'ipv4first' ;
39853987
39863988 try {
39873989 const configName = getConfigFileName ( ) ;
39883990 const config : ioBroker . IoBrokerJson = fs . readJSONSync ( configName ) ;
39893991 dnsOrder = config . dnsResolution || dnsOrder ;
39903992 } catch ( e ) {
3991- console . warn ( `Could not determine dns resolution order, fallback to "ipv4first": ${ e . message } ` ) ;
3993+ if ( e . code !== 'ENOENT' ) {
3994+ console . warn ( `Could not determine dns resolution order, fallback to "ipv4first": ${ e . message } ` ) ;
3995+ }
39923996 }
39933997
39943998 return dnsOrder ;
You can’t perform that action at this time.
0 commit comments