File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,17 @@ async function startServer() {
172172 await new Promise < void > ( ( resolve ) => httpServer . listen ( port , resolve ) ) ;
173173
174174 async function closeServer ( ) {
175- logger . crit ( "Stopping Server" ) ;
176- tryQuietly ( frontend . close ) ;
177- tryQuietly ( connectorSubscription . unsubscribe ) ;
178- tryQuietly ( agentSubscription . unsubscribe ) ;
179- tryQuietly ( loggingLevelSubscription . unsubscribe ) ;
180- tryQuietly ( api . stop ) ;
181- tryQuietly ( ( ) => httpServer . close ( ( ) => logger . info ( "HTTP Server Closed" ) ) ) ;
182- logger . crit ( "Server Stopped" ) ;
175+ logger . info ( "Stopping Server" ) ;
176+ await tryQuietly ( frontend . close ) ;
177+ await tryQuietly ( connectorSubscription . unsubscribe ) ;
178+ await tryQuietly ( agentSubscription . unsubscribe ) ;
179+ await tryQuietly ( loggingLevelSubscription . unsubscribe ) ;
180+ await tryQuietly ( api . stop ) ;
181+ await tryQuietly ( ( ) =>
182+ httpServer . close ( ( ) => logger . info ( "HTTP Server Closed" ) )
183+ ) ;
184+ logger . info ( "Server Stopped" ) ;
185+ process . exit ( 0 ) ;
183186 }
184187
185188 process . on ( "SIGTERM" , closeServer ) ;
You can’t perform that action at this time.
0 commit comments