mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-05-02 17:23:07 +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:
@@ -17,6 +17,9 @@
|
||||
#ifndef CDC_STREAM_BACKGROUND_SERVICE_IMPL_H_
|
||||
#define CDC_STREAM_BACKGROUND_SERVICE_IMPL_H_
|
||||
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "cdc_stream/background_service_impl.h"
|
||||
#include "cdc_stream/session_management_server.h"
|
||||
@@ -52,6 +55,7 @@ class BackgroundServiceImpl final
|
||||
|
||||
private:
|
||||
ExitCallback exit_callback_;
|
||||
std::unique_ptr<std::thread> exit_thread_;
|
||||
};
|
||||
|
||||
} // namespace cdc_ft
|
||||
|
||||
Reference in New Issue
Block a user