diff --git a/fairmq/plugins/DDS/DDS.cxx b/fairmq/plugins/DDS/DDS.cxx index dc565f00..5461684a 100644 --- a/fairmq/plugins/DDS/DDS.cxx +++ b/fairmq/plugins/DDS/DDS.cxx @@ -92,6 +92,9 @@ DDS::DDS(const string& name, break; } case DeviceState::Exiting: + if (!fControllerThread.joinable()) { + fControllerThread = thread(&DDS::WaitForExitingAck, this); + } fWorkGuard.reset(); fDeviceTerminationRequested = true; UnsubscribeFromDeviceStateChange(); @@ -358,9 +361,6 @@ auto DDS::SubscribeForCustomCommands() -> void case cmd::Type::subscribe_to_state_change: { lock_guard lock{fStateChangeSubscriberMutex}; fStateChangeSubscribers.insert(senderId); - if (!fControllerThread.joinable()) { - fControllerThread = thread(&DDS::WaitForExitingAck, this); - } LOG(debug) << "Publishing state-change: " << fLastState << "->" << fCurrentState << " to " << senderId; diff --git a/fairmq/plugins/DDS/runDDSCommandUI.cxx b/fairmq/plugins/DDS/runDDSCommandUI.cxx index 19c13b0a..20820ca3 100644 --- a/fairmq/plugins/DDS/runDDSCommandUI.cxx +++ b/fairmq/plugins/DDS/runDDSCommandUI.cxx @@ -145,6 +145,7 @@ try { unsigned int timeout; fair::Logger::SetConsoleSeverity("debug"); + fair::Logger::SetConsoleColor(true); bpo::options_description options("Common options"); diff --git a/fairmq/sdk/Topology.h b/fairmq/sdk/Topology.h index e6f6ee99..8099e62a 100644 --- a/fairmq/sdk/Topology.h +++ b/fairmq/sdk/Topology.h @@ -238,7 +238,7 @@ class BasicTopology : public AsioBase }); fDDSSession.StartDDSService(); - LOG(debug) << "Subscribing to state change"; + // LOG(debug) << "Subscribing to state change"; Cmds cmds(make()); fDDSSession.SendCommand(cmds.Serialize()); }