mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-05-02 08:13:08 +03:00
[cdc_stream] Implement stop-service command (#29)
Implements cdc_stream stop-service. Also fixes an issue in the BackgroundService implementation where Exit() would deadlock since server shutdown waits for all RPCs to exit.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "cdc_stream/start_command.h"
|
||||
#include "cdc_stream/start_service_command.h"
|
||||
#include "cdc_stream/stop_command.h"
|
||||
#include "cdc_stream/stop_service_command.h"
|
||||
#include "lyra/lyra.hpp"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
@@ -33,6 +34,9 @@ int main(int argc, char* argv[]) {
|
||||
cdc_ft::StartServiceCommand start_service_cmd(&exit_code);
|
||||
start_service_cmd.Register(cli);
|
||||
|
||||
cdc_ft::StopServiceCommand stop_service_cmd(&exit_code);
|
||||
stop_service_cmd.Register(cli);
|
||||
|
||||
// Parse args and run. Note that parse actually runs the commands.
|
||||
// exit_code is -1 if no command was run.
|
||||
auto result = cli.parse({argc, argv});
|
||||
|
||||
Reference in New Issue
Block a user