File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { ChildProcess } from 'child_process';
22
33import { EXPRESS_PORT } from '@/config' ;
44import { logger } from '@/lib/utils' ;
5- import server from '@/server' ;
5+ import server , { io } from '@/server' ;
66import { initWorker } from '@/workers' ;
77
88const workers : ChildProcess [ ] = [ ] ;
@@ -19,11 +19,13 @@ const shutdown = () => {
1919 workers . forEach ( ( worker ) => {
2020 worker . kill ( ) ;
2121 } ) ;
22+ io . close ( ( ) => {
23+ logger . info ( 'WS Server shut down' ) ;
24+ } ) ;
2225 server . close ( ( ) => {
2326 logger . info ( 'App shut down' ) ;
2427 } ) ;
2528} ;
2629
2730process . on ( 'SIGINT' , shutdown ) ;
2831process . on ( 'SIGTERM' , shutdown ) ;
29- process . on ( 'exit' , shutdown ) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ const shutdown = () => {
2525} ;
2626
2727process . on ( 'SIGINT' , shutdown ) ;
28- process . on ( 'SIGHUP' , shutdown ) ;
2928process . on ( 'SIGTERM' , shutdown ) ;
3029
3130async function clean ( ) {
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ const shutdown = () => {
2525} ;
2626
2727process . on ( 'SIGINT' , shutdown ) ;
28- process . on ( 'SIGHUP' , shutdown ) ;
2928process . on ( 'SIGTERM' , shutdown ) ;
3029
3130type RequestorParams = {
You can’t perform that action at this time.
0 commit comments