diff --git a/smocore/marionette/lifetime.cpp b/smocore/marionette/lifetime.cpp index 7c36708..5d8fa72 100644 --- a/smocore/marionette/lifetime.cpp +++ b/smocore/marionette/lifetime.cpp @@ -76,6 +76,8 @@ public: + ": Must be executed on Marionette thread"); } + device::DeviceManager::getInstance().finalizeDeviceReattacher(); + /** FIXME: * It may be necessary to add a delay here to ensure that all in-flight * timer timeouts have finished executing? Or some other mechanism. @@ -87,10 +89,11 @@ public: * * This seems to be actually happening with the delayed calls to * AttachDeviceReq::attachDeviceReq2() inside of livoxGen1.cpp. + * + * One tactic might be to shut down device reattacher before finalizing + * and pause for a bit before continuing to shutdown other components. */ - device::DeviceManager::getInstance().finalizeDeviceReattacher(); - smo::mind::globalMind->finalizeReq({context, std::bind( &MrnttLifetimeMgmtOp::finalizeReq2, this, context, std::placeholders::_1)});