Open state API befor replaying TLS and setting up stuff to allow insight during startup.
#include <vespa/vespalib/util/closuretask.h>
#include <vespa/vespalib/util/host_name.h>
#include <vespa/vespalib/util/random.h>
-#include <dirent.h>
#include <vespa/searchlib/aggregation/forcelink.hpp>
#include <vespa/searchlib/expression/forcelink.hpp>
@@ -313,13 +312,13 @@ Proton::init(const BootstrapConfig::SP & configSnapshot)
rpcParams.slobrok_config = _configUri.createWithNewId(protonConfig.slobrokconfigid);
_rpcHooks.reset(new RPCHooks(rpcParams));
- waitForInitDone();
-
_metricsEngine->start(_configUri);
_stateServer.reset(new vespalib::StateServer(protonConfig.httpport, _healthAdapter, _metricsEngine->metrics_producer(), *this));
_customComponentBindToken = _stateServer->repo().bind(CUSTOM_COMPONENT_API_PATH, _genericStateHandler);
_customComponentRootToken = _stateServer->repo().add_root_resource(CUSTOM_COMPONENT_API_PATH);
+ waitForInitDone();
+
_executor.sync();
waitForOnlineState();
_isReplayDone = true;
