fix: set running_=true before starting fabric-bridge worker thread
This commit is contained in:
@@ -87,6 +87,7 @@ void FabricBridgeNode::on_remove_reader(const std::string& port_id) {
|
|||||||
|
|
||||||
void FabricBridgeNode::process() {
|
void FabricBridgeNode::process() {
|
||||||
if (!worker_thread_.has_value() && start_requested_.load()) {
|
if (!worker_thread_.has_value() && start_requested_.load()) {
|
||||||
|
running_ = true;
|
||||||
spdlog::info("Fabric-bridge: starting worker thread (mode={})", mode_ == FabricMode::Initiator ? "initiator" : "target");
|
spdlog::info("Fabric-bridge: starting worker thread (mode={})", mode_ == FabricMode::Initiator ? "initiator" : "target");
|
||||||
if (mode_ == FabricMode::Initiator) {
|
if (mode_ == FabricMode::Initiator) {
|
||||||
worker_thread_ = std::thread(&FabricBridgeNode::run_initiator, this);
|
worker_thread_ = std::thread(&FabricBridgeNode::run_initiator, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user