diff --git a/smocore/deviceManager/deviceReattacher.cpp b/smocore/deviceManager/deviceReattacher.cpp index b8ff1e9..5b7a679 100644 --- a/smocore/deviceManager/deviceReattacher.cpp +++ b/smocore/deviceManager/deviceReattacher.cpp @@ -37,10 +37,10 @@ void DeviceReattacher::stop() shouldContinue.store(false); timer.cancel(); - // Set up a timeout bridge using Marionette thread's io_service - auto& mrnttIoService = ComponentThread::getMrntt()->getIoService(); - boost::asio::deadline_timer timeoutTimer(mrnttIoService); - AsynchronousBridge bridge(mrnttIoService); + // Set up a timeout bridge using the provided ioThread's io_service + auto& ioService = ioThread->getIoService(); + boost::asio::deadline_timer timeoutTimer(ioService); + AsynchronousBridge bridge(ioService); // Set up the timeout for ~10ms timeoutTimer.expires_from_now(boost::posix_time::milliseconds(20));