Skip to content

Commit 27c50a3

Browse files
committed
Event handler waits a long time before terminating #436
1 parent 255c69f commit 27c50a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/DefaultEventHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ public class DefaultEventHandler implements EventHandler {
4343
private final Map<String, RetryExecution> retryState = new HashMap<>();
4444
private final String controllerName;
4545
private final int terminationTimeout;
46-
private DefaultEventSourceManager eventSourceManager;
47-
4846
private final ReentrantLock lock = new ReentrantLock();
47+
private DefaultEventSourceManager eventSourceManager;
4948

5049
public DefaultEventHandler(
5150
ResourceController controller, ControllerConfiguration configuration, MixedOperation client) {
@@ -91,6 +90,7 @@ private DefaultEventHandler(
9190
public void close() {
9291
try {
9392
log.debug("Closing handler for {}", controllerName);
93+
executor.shutdown();
9494
executor.awaitTermination(terminationTimeout, TimeUnit.SECONDS);
9595
} catch (InterruptedException e) {
9696
log.debug("Exception closing handler for {}: {}", controllerName, e.getLocalizedMessage());

0 commit comments

Comments
 (0)