File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -839,13 +839,15 @@ export function _runTaskList(
839
839
cancelledJobs,
840
840
} ) ;
841
841
}
842
+
842
843
if ( this . _forcefulShuttingDown ) {
843
844
errors . push (
844
845
new Error (
845
846
"forcefulShutdown was initiated whilst gracefulShutdown was still executing." ,
846
847
) ,
847
848
) ;
848
849
}
850
+
849
851
if ( errors . length === 1 ) {
850
852
throw errors [ 0 ] ;
851
853
} else if ( errors . length > 1 ) {
@@ -872,8 +874,13 @@ export function _runTaskList(
872
874
error : e ,
873
875
} ,
874
876
) ;
875
- // Note: we now rely on forcefulShutdown to handle terminate()
876
- return this . forcefulShutdown ( message ) ;
877
+ // NOTE: we now rely on forcefulShutdown to handle terminate()
878
+ if ( this . _forcefulShuttingDown ) {
879
+ // Skip the warning about double shutdown
880
+ return forcefulShutdownPromise ;
881
+ } else {
882
+ return this . forcefulShutdown ( message ) ;
883
+ }
877
884
}
878
885
if ( ! terminated ) {
879
886
await terminate ( ) ;
You can’t perform that action at this time.
0 commit comments