File tree 1 file changed +7
-4
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -76,13 +76,16 @@ private void doStop() {
76
76
try {
77
77
log .debug ("Closing executor" );
78
78
executor .shutdown ();
79
- workflowExecutor .shutdown ();
80
- if (!executor .awaitTermination (terminationTimeoutSeconds , TimeUnit .SECONDS )) {
81
- executor .shutdownNow (); // if we timed out, waiting, cancel everything
79
+ if (workflowExecutor != null ) {
80
+ workflowExecutor .shutdown ();
81
+ if (!workflowExecutor .awaitTermination (terminationTimeoutSeconds , TimeUnit .SECONDS )) {
82
+ workflowExecutor .shutdownNow (); // if we timed out, waiting, cancel everything
83
+ }
82
84
}
83
- if (!workflowExecutor .awaitTermination (terminationTimeoutSeconds , TimeUnit .SECONDS )) {
85
+ if (!executor .awaitTermination (terminationTimeoutSeconds , TimeUnit .SECONDS )) {
84
86
executor .shutdownNow (); // if we timed out, waiting, cancel everything
85
87
}
88
+
86
89
} catch (InterruptedException e ) {
87
90
log .debug ("Exception closing executor: {}" , e .getLocalizedMessage ());
88
91
}
You can’t perform that action at this time.
0 commit comments