diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-02-07 15:17:50 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-02-07 15:17:50 +0100 |
commit | 3144aec4cff50f200115c8ed06fa34594e7f3026 (patch) | |
tree | 989a65b028ffe966a3e1c89e57788afbd1da21dd /standalone-container | |
parent | 5732785a8c5612c46c20c4c24d1f375ebb3e2e7f (diff) |
Throw exception if subscriber is invoked after it's closed
Diffstat (limited to 'standalone-container')
-rw-r--r-- | standalone-container/src/main/java/com/yahoo/container/standalone/StandaloneSubscriberFactory.java | 4 |
1 files changed, 2 insertions, 2 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..5555b3b4077 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 @@ -4,6 +4,7 @@ package com.yahoo.container.standalone; import com.yahoo.config.ConfigBuilder; import com.yahoo.config.ConfigInstance; import com.yahoo.config.subscription.ConfigInterruptedException; +import com.yahoo.config.subscription.SubscriberClosedException; import com.yahoo.container.di.config.Subscriber; import com.yahoo.container.di.config.SubscriberFactory; import com.yahoo.vespa.config.ConfigKey; @@ -66,8 +67,7 @@ public class StandaloneSubscriberFactory implements SubscriberFactory { while (!shutdown && !Thread.interrupted()) { Thread.sleep(100); } - if (shutdown) // Same semantics as an actual interrupt - throw new ConfigInterruptedException(new InterruptedException()); + if (shutdown) throw new SubscriberClosedException(); } catch (InterruptedException e) { throw new ConfigInterruptedException(e); } |