File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -178,18 +178,16 @@ function validateHints(hints) {
178178}
179179
180180let invalidHostnameWarningEmitted = false ;
181-
182181function emitInvalidHostnameWarning ( hostname ) {
183- if ( invalidHostnameWarningEmitted ) {
184- return ;
182+ if ( ! invalidHostnameWarningEmitted ) {
183+ process . emitWarning (
184+ `The provided hostname "${ hostname } " is not a valid ` +
185+ 'hostname, and is supported in the dns module solely for compatibility.' ,
186+ 'DeprecationWarning' ,
187+ 'DEP0118'
188+ ) ;
189+ invalidHostnameWarningEmitted = true ;
185190 }
186- invalidHostnameWarningEmitted = true ;
187- process . emitWarning (
188- `The provided hostname "${ hostname } " is not a valid ` +
189- 'hostname, and is supported in the dns module solely for compatibility.' ,
190- 'DeprecationWarning' ,
191- 'DEP0118'
192- ) ;
193191}
194192
195193let dnsOrder = getOptionValue ( '--dns-result-order' ) || 'ipv4first' ;
You can’t perform that action at this time.
0 commit comments