File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -203,14 +203,18 @@ public synchronized void start() {
203203 public void stop () throws OperatorException {
204204 Duration reconciliationTerminationTimeout =
205205 configurationService .reconciliationTerminationTimeout ();
206+
207+ // Always stop the executor service manager to prevent dangling threads,
208+ // even if the operator didn't fully start
209+ configurationService .getExecutorServiceManager ().stop (reconciliationTerminationTimeout );
210+
206211 if (!started ) {
207212 return ;
208213 }
209214 log .info (
210215 "Operator SDK {} is shutting down..." , configurationService .getVersion ().getSdkVersion ());
211216 controllerManager .stop ();
212217
213- configurationService .getExecutorServiceManager ().stop (reconciliationTerminationTimeout );
214218 leaderElectionManager .stop ();
215219 if (configurationService .closeClientOnStop ()) {
216220 getKubernetesClient ().close ();
You can’t perform that action at this time.
0 commit comments