File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -469,9 +469,9 @@ export function getServerTerminator(
469
469
server : Server | Http2SecureServer ,
470
470
) : ( ) => Promise < void > {
471
471
let listened = false ;
472
- const pendingSockets = new Set < net . Socket > ( ) ;
472
+ const pendingSockets = new Set < Socket > ( ) ;
473
473
474
- const onConnection = ( socket : net . Socket ) => {
474
+ const onConnection = ( socket : Socket ) => {
475
475
pendingSockets . add ( socket ) ;
476
476
socket . on ( 'close' , ( ) => {
477
477
pendingSockets . delete ( socket ) ;
Original file line number Diff line number Diff line change 1
- import { promises as dns } from 'node:dns' ;
2
1
import type { DevConfig , ServerConfig } from '../types/config' ;
3
2
import { isWildcardHost } from './helper' ;
4
3
@@ -12,6 +11,7 @@ import { isWildcardHost } from './helper';
12
11
export async function getLocalhostResolvedAddress ( ) : Promise <
13
12
string | undefined
14
13
> {
14
+ const { promises : dns } = await import ( 'node:dns' ) ;
15
15
const [ defaultLookup , explicitLookup ] = await Promise . all ( [
16
16
dns . lookup ( 'localhost' ) ,
17
17
dns . lookup ( 'localhost' , { verbatim : true } ) ,
You can’t perform that action at this time.
0 commit comments