diff options
-rw-r--r-- | searchcore/src/apps/proton/proton.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searchcore/src/apps/proton/proton.cpp b/searchcore/src/apps/proton/proton.cpp index 4dc8a90079a..386ceb4eeda 100644 --- a/searchcore/src/apps/proton/proton.cpp +++ b/searchcore/src/apps/proton/proton.cpp @@ -205,9 +205,11 @@ buildTransportConfig() { class Transport { public: - Transport(const fnet::TransportConfig & config) + Transport(const fnet::TransportConfig & config, FastOS_ThreadPool & threadPool) : _transport(config) - {} + { + _transport.Start(&threadPool); + } ~Transport() { _transport.ShutDown(true); } @@ -281,8 +283,7 @@ App::main(int argc, char **argv) setupSignals(); setup_fadvise(); FastOS_ThreadPool threadPool(128_Ki); - Transport transport(buildTransportConfig()); - transport.transport().Start(&threadPool); + Transport transport(buildTransportConfig(), threadPool); startAndRun(threadPool, transport.transport(), argc, argv); } catch (const vespalib::InvalidCommandLineArgumentsException &e) { LOG(warning, "Invalid commandline arguments: '%s'", e.what()); |