File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -699,15 +699,16 @@ export const createServer = async (
699
699
async function waitForPort (
700
700
port : number ,
701
701
host = "0.0.0.0" ,
702
- timeout = 5000 ,
702
+ timeout = 30000 ,
703
703
) : Promise < void > {
704
704
const start = Date . now ( ) ;
705
705
while ( Date . now ( ) - start < timeout ) {
706
706
const available = await isPortAvailable ( port , host ) ;
707
707
if ( available ) {
708
708
return ;
709
709
}
710
- await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ; // Wait 1 second before retrying
710
+ console . warn ( `${ host } :${ port } is in use, checking again in 1s` )
711
+ await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ; // Wait 1 second before retrying
711
712
}
712
713
throw new Error (
713
714
`Timeout: port ${ port } is still in use after ${ timeout / 1000 } seconds.` ,
You can’t perform that action at this time.
0 commit comments