diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-10-03 15:27:00 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2018-10-03 15:27:00 +0200 |
commit | a16108651c4393baefe3fccf19b420b212efc295 (patch) | |
tree | 75e2fe398aa21f893e2d338b0999191e7683a741 /config | |
parent | 948490aa3556e05e536cf7326dcbce2afc14b49b (diff) |
Throw exception when ConfigFetcher::start() fails to get initial config.
Diffstat (limited to 'config')
-rw-r--r-- | config/src/vespa/config/helper/configfetcher.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/src/vespa/config/helper/configfetcher.cpp b/config/src/vespa/config/helper/configfetcher.cpp index 5a3cdad814e..041022755b4 100644 --- a/config/src/vespa/config/helper/configfetcher.cpp +++ b/config/src/vespa/config/helper/configfetcher.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "configfetcher.h" +#include <vespa/config/common/exceptions.h> #include <vespa/vespalib/util/thread.h> #include <vespa/log/log.h> LOG_SETUP(".config.helper.configfetcher"); @@ -34,6 +35,9 @@ ConfigFetcher::start() if (!_closed) { LOG(debug, "Polling for config"); _poller.poll(); + if (_poller.getGeneration() == -1) { + throw ConfigTimeoutException("ConfigFetcher::start timed out getting initial config"); + } LOG(debug, "Starting fetcher thread..."); _thread->start(); _started = true; |