diff options
author | Bjørn Christian Seime <bjorn.christian@seime.no> | 2022-02-07 11:56:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 11:56:37 +0100 |
commit | 395d83f29a1d270c2d29a5226429d21c34465327 (patch) | |
tree | d6556906d4c61e6b25572c5978e328be72997292 /standalone-container | |
parent | ce128399b3c29f0b9178f45fb522efb5ff631fe3 (diff) |
Revert "Shutdown reconfiguration thread in a more controlled way [run-systemtest]"
Diffstat (limited to 'standalone-container')
-rw-r--r-- | standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java b/standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java index 907c9649912..11f799fcfd4 100644 --- a/standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java +++ b/standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java @@ -31,7 +31,6 @@ public class StandaloneSubscriberFactory implements SubscriberFactory { private final Set<ConfigKey<ConfigInstance>> configKeys; private long generation = -1L; - private volatile boolean shutdown = false; StandaloneSubscriber(Set<ConfigKey<ConfigInstance>> configKeys) { this.configKeys = configKeys; @@ -42,7 +41,9 @@ public class StandaloneSubscriberFactory implements SubscriberFactory { return generation == 0; } - @Override public void close() { shutdown = true; } + @Override + public void close() { + } @Override public Map<ConfigKey<ConfigInstance>, ConfigInstance> config() { @@ -63,11 +64,9 @@ public class StandaloneSubscriberFactory implements SubscriberFactory { if (generation != 0) { try { - while (!shutdown && !Thread.interrupted()) { - Thread.sleep(100); + while (!Thread.interrupted()) { + Thread.sleep(10000); } - if (shutdown) // Same semantics as an actual interrupt - throw new ConfigInterruptedException(new InterruptedException()); } catch (InterruptedException e) { throw new ConfigInterruptedException(e); } |