summaryrefslogtreecommitdiffstats
path: root/config-proxy
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-09-16 23:32:13 +0200
committerHarald Musum <musum@verizonmedia.com>2020-09-16 23:32:13 +0200
commit1a489748efccae6b5c2917ec8d975d2c2b4f1644 (patch)
tree999403981f17550cf02ce02079957bdaa1fea7cc /config-proxy
parent98e8ff7b34016a93d86b7a25240c48ad09c5abaa (diff)
Close requester when shutting down
Diffstat (limited to 'config-proxy')
-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();
}
/**