mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Notify extensions we're going offline before we actually do
This commit is contained in:
+2
-1
@@ -250,6 +250,8 @@ bool Device::goOnline() {
|
||||
}
|
||||
|
||||
bool Device::goOffline() {
|
||||
forEachExtension([](const std::shared_ptr<DeviceExtension>& 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<DeviceExtension>& ext) { ext->onGoOffline(); return true; });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user