summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-09-17 10:08:53 +0200
committerGitHub <noreply@github.com>2020-09-17 10:08:53 +0200
commit9dc0561e9d69a2f333bd010ceee007e54da12b46 (patch)
treebe73e5f33fafb4b1c553989fa9ca880269a5de5d
parent840ee2e88270f967ef638856be24cbab0296ed97 (diff)
parent1a489748efccae6b5c2917ec8d975d2c2b4f1644 (diff)
Merge pull request #14430 from vespa-engine/hmusum/close-requester-at-shutdown
Close requester when shutting down
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
index d557393638d..0085758f325 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java
@@ -51,12 +51,12 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
private final static TimingValues timingValues;
private final ScheduledExecutorService nextConfigScheduler =
Executors.newScheduledThreadPool(1, new DaemonThreadFactory("next config"));
- private ScheduledFuture<?> nextConfigFuture;
+ private final ScheduledFuture<?> nextConfigFuture;
private final JRTConfigRequester requester;
// Scheduled executor that periodically checks for requests that have timed out and response should be returned to clients
private final ScheduledExecutorService delayedResponsesScheduler =
Executors.newScheduledThreadPool(1, new DaemonThreadFactory("delayed responses"));
- private ScheduledFuture<?> delayedResponsesFuture;
+ private final ScheduledFuture<?> delayedResponsesFuture;
static {
// Proxy should time out before clients upon subscription.
@@ -184,6 +184,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable {
delayedResponsesScheduler.shutdownNow();
nextConfigFuture.cancel(true);
nextConfigScheduler.shutdownNow();
+ requester.close();
}
/**