Device: Guard mutex usage

pull/76/merge
Kyle Schwarz 2025-10-30 11:18:12 -04:00
parent 83ab65b062
commit ebf9409c18
1 changed files with 19 additions and 17 deletions

View File

@ -554,6 +554,7 @@ bool Device::goOnline() {
return false;
}
if(supportsNetworkMutex()) {
assignedClientId = com->getClientIDSync();
if(assignedClientId) {
// firmware supports clientid/mutex
@ -575,6 +576,7 @@ bool Device::goOnline() {
}
);
}
}
// (re)start the keeponline
keeponline = std::make_unique<Periodic>([this] { return enableNetworkCommunication(true, onlineTimeoutMs); }, std::chrono::milliseconds(onlineTimeoutMs / 4));