diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-05-10 11:25:48 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-05-10 12:25:38 +0000 |
commit | 4412aace869986be3a1060f78f367841353d3384 (patch) | |
tree | f4b5e1f6da5eaf1563f3b2fd64779800acfd5796 /configd/src/apps/cmd | |
parent | 840d4e0578dc627b75bcd0050f1b253e84cc30ed (diff) |
Simplify the supervisor responsibility
Diffstat (limited to 'configd/src/apps/cmd')
-rw-r--r-- | configd/src/apps/cmd/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/configd/src/apps/cmd/main.cpp b/configd/src/apps/cmd/main.cpp index 6228de86a80..e448fff1c6d 100644 --- a/configd/src/apps/cmd/main.cpp +++ b/configd/src/apps/cmd/main.cpp @@ -14,7 +14,8 @@ LOG_SETUP("vespa-sentinel-cmd"); class Cmd { private: - std::unique_ptr<FRT_Supervisor> _supervisor; + std::unique_ptr<fnet::frt::StandaloneFRT> _server; + FRT_Supervisor *_supervisor; FRT_Target *_target; public: @@ -44,9 +45,9 @@ void usage() void Cmd::initRPC(const char *spec) { - _supervisor = std::make_unique<FRT_Supervisor>(); + _server = std::make_unique<fnet::frt::StandaloneFRT>(); + _supervisor = & _server->supervisor(); _target = _supervisor->GetTarget(spec); - _supervisor->Start(); } @@ -57,9 +58,9 @@ Cmd::finiRPC() _target->SubRef(); _target = nullptr; } - if (_supervisor) { - _supervisor->ShutDown(true); - _supervisor.reset(); + if (_server) { + _server.reset(); + _supervisor = nullptr; } } |