diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 23:09:06 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 23:09:06 +0200 |
commit | 255615de1c38f346ae97f662d067d3a1f82b2b8c (patch) | |
tree | e09d9aca5c2f1d43e75a939eca7182a7d658f9d8 /searchcore | |
parent | 439bc3fef0b6ce3ec5cee9ed85e61a8a50dc1bdf (diff) |
If we fail to listen on a port we just throw an PortlistenException and restart.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/proton.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index f9932deb641..be8df97b683 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -5,7 +5,6 @@ #include "flushhandlerproxy.h" #include "memoryflush.h" #include "persistencehandlerproxy.h" -#include "persistenceproviderproxy.h" #include "proton.h" #include "resource_usage_explorer.h" #include "searchhandlerproxy.h" @@ -309,14 +308,13 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) _executor.sync(); waitForOnlineState(); _isReplayDone = true; - bool startOk = _fs4Server->start(); + if ( ! _fs4Server->start() ) { + throw vespalib::PortListenException(protonConfig.ptport, "FS4"); + } int port = _fs4Server->getListenPort(); _matchEngine->setOnline(); _matchEngine->setInService(); - LOG(debug, - "Started fs4 interface (startOk=%s, port=%d)", - startOk ? "true" : "false", - port); + LOG(debug, "Started fs4 interface on port %d", port); _flushEngine->start(); _isInitializing = false; _protonConfigurer.setAllowReconfig(true); |