File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1010,6 +1010,11 @@ export async function main(options: IServerOptions): Promise<void> {
1010
1010
} ) ;
1011
1011
} ) ;
1012
1012
1013
+ server . on ( 'error' , ( ) => {
1014
+ server . close ( ) ;
1015
+ process . exit ( 1 ) ;
1016
+ } ) ;
1017
+
1013
1018
if ( parsedArgs . socket ) {
1014
1019
server . listen ( parsedArgs . socket , ( ) => {
1015
1020
logService . info ( `Server listening on ${ parsedArgs . socket } ` ) ;
@@ -1023,10 +1028,6 @@ export async function main(options: IServerOptions): Promise<void> {
1023
1028
}
1024
1029
1025
1030
const host = parsedArgs . host || '0.0.0.0' ;
1026
- server . on ( 'error' , ( ) => {
1027
- server . close ( ) ;
1028
- process . exit ( 1 ) ;
1029
- } ) ;
1030
1031
server . listen ( port , host , ( ) => {
1031
1032
const addressInfo = server . address ( ) as net . AddressInfo ;
1032
1033
const address = addressInfo . address === '0.0.0.0' || addressInfo . address === '127.0.0.1' ? 'localhost' : addressInfo . address ;
You can’t perform that action at this time.
0 commit comments