mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
DDS plugin: fix exiting timeout
This commit is contained in:
parent
21835cc104
commit
beff0af51b
|
@ -92,6 +92,9 @@ DDS::DDS(const string& name,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DeviceState::Exiting:
|
case DeviceState::Exiting:
|
||||||
|
if (!fControllerThread.joinable()) {
|
||||||
|
fControllerThread = thread(&DDS::WaitForExitingAck, this);
|
||||||
|
}
|
||||||
fWorkGuard.reset();
|
fWorkGuard.reset();
|
||||||
fDeviceTerminationRequested = true;
|
fDeviceTerminationRequested = true;
|
||||||
UnsubscribeFromDeviceStateChange();
|
UnsubscribeFromDeviceStateChange();
|
||||||
|
@ -358,9 +361,6 @@ auto DDS::SubscribeForCustomCommands() -> void
|
||||||
case cmd::Type::subscribe_to_state_change: {
|
case cmd::Type::subscribe_to_state_change: {
|
||||||
lock_guard<mutex> lock{fStateChangeSubscriberMutex};
|
lock_guard<mutex> lock{fStateChangeSubscriberMutex};
|
||||||
fStateChangeSubscribers.insert(senderId);
|
fStateChangeSubscribers.insert(senderId);
|
||||||
if (!fControllerThread.joinable()) {
|
|
||||||
fControllerThread = thread(&DDS::WaitForExitingAck, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG(debug) << "Publishing state-change: " << fLastState << "->" << fCurrentState
|
LOG(debug) << "Publishing state-change: " << fLastState << "->" << fCurrentState
|
||||||
<< " to " << senderId;
|
<< " to " << senderId;
|
||||||
|
|
|
@ -145,6 +145,7 @@ try {
|
||||||
unsigned int timeout;
|
unsigned int timeout;
|
||||||
|
|
||||||
fair::Logger::SetConsoleSeverity("debug");
|
fair::Logger::SetConsoleSeverity("debug");
|
||||||
|
fair::Logger::SetConsoleColor(true);
|
||||||
|
|
||||||
bpo::options_description options("Common options");
|
bpo::options_description options("Common options");
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,7 @@ class BasicTopology : public AsioBase<Executor, Allocator>
|
||||||
});
|
});
|
||||||
|
|
||||||
fDDSSession.StartDDSService();
|
fDDSSession.StartDDSService();
|
||||||
LOG(debug) << "Subscribing to state change";
|
// LOG(debug) << "Subscribing to state change";
|
||||||
Cmds cmds(make<SubscribeToStateChange>());
|
Cmds cmds(make<SubscribeToStateChange>());
|
||||||
fDDSSession.SendCommand(cmds.Serialize());
|
fDDSSession.SendCommand(cmds.Serialize());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user