diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-11-22 14:15:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 14:15:58 +0100 |
commit | 6b911ad4d69fb29108615230139c3c78b43f82c5 (patch) | |
tree | 84ab65305299bc6a9838cc87c6020e6dcf65adba /searchcore/src/apps/proton/proton.cpp | |
parent | bb85dda164515a47fb99173d0c642a52dd5283c7 (diff) | |
parent | 0ba6bd6683c981bec57c2a96074d13472f841c70 (diff) |
Merge branch 'master' into balder/milliseconds-in-config-rebased-1
Diffstat (limited to 'searchcore/src/apps/proton/proton.cpp')
-rw-r--r-- | searchcore/src/apps/proton/proton.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searchcore/src/apps/proton/proton.cpp b/searchcore/src/apps/proton/proton.cpp index a805506b381..c63e3c9181c 100644 --- a/searchcore/src/apps/proton/proton.cpp +++ b/searchcore/src/apps/proton/proton.cpp @@ -185,7 +185,7 @@ App::Main() bool stopOnIOErrors = protonConfig.stoponioerrors; vespalib::mkdir(basedir, true); // TODO: Test that we can write to new file in directory - stateFile.reset(new search::StateFile(basedir + "/state")); + stateFile = std::make_unique<search::StateFile>(basedir + "/state"); int stateGen = stateFile->getGen(); vespalib::string stateString = getStateString(*stateFile); std::unique_ptr<PersistenceProvider> downPersistence; @@ -193,7 +193,7 @@ App::Main() LOG(error, "proton state string is %s", stateString.c_str()); if (stopOnIOErrors) { if ( !params.serviceidentity.empty()) { - downPersistence.reset(new DownPersistence("proton state string is " + stateString)); + downPersistence = std::make_unique<DownPersistence>("proton state string is " + stateString); } else { LOG(info, "Sleeping 900 seconds due to proton state"); int sleepLeft = 900; @@ -206,8 +206,8 @@ App::Main() } } } - sigBusHandler.reset(new search::SigBusHandler(stateFile.get())); - ioErrorHandler.reset(new search::IOErrorHandler(stateFile.get())); + sigBusHandler = std::make_unique<search::SigBusHandler>(stateFile.get()); + ioErrorHandler = std::make_unique<search::IOErrorHandler>(stateFile.get()); if ( ! params.serviceidentity.empty()) { proton.getMetricManager().init(params.serviceidentity, proton.getThreadPool()); } else { @@ -219,8 +219,8 @@ App::Main() configSnapshot.reset(); std::unique_ptr<ProtonServiceLayerProcess> spiProton; if ( ! params.serviceidentity.empty()) { - spiProton.reset(new ProtonServiceLayerProcess(params.serviceidentity, proton, downPersistence.get())); - spiProton->setupConfig(std::chrono::milliseconds(params.subscribeTimeout)); + spiProton = std::make_unique<ProtonServiceLayerProcess>(params.serviceidentity, proton, downPersistence.get()); + spiProton->setupConfig(params.subscribeTimeout); spiProton->createNode(); EV_STARTED("servicelayer"); } |