diff --git a/device/device.cpp b/device/device.cpp index 54e334b..2a2ec6c 100644 --- a/device/device.cpp +++ b/device/device.cpp @@ -250,6 +250,8 @@ bool Device::goOnline() { } bool Device::goOffline() { + forEachExtension([](const std::shared_ptr& ext) { ext->onGoOffline(); return true; }); + if(!com->sendCommand(Command::EnableNetworkCommunication, false)) return false; @@ -275,7 +277,6 @@ bool Device::goOffline() { online = false; - forEachExtension([](const std::shared_ptr& ext) { ext->onGoOffline(); return true; }); return true; }