mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Fix: return failure when PhoneAPI times out (#3136)
* Add debug options for RP2040 * Rename: "observed" should be plural: "observables" * PhoneAPI: return failure on timeout In `onNotify()`, when disconnected, PhoneAPI removed itself from the list of observers that was looped through in `notifyObservers()`. We should exit that loop in that case.
This commit is contained in:
@@ -108,8 +108,9 @@ void MeshService::loop()
|
||||
(void)sendQueueStatusToPhone(qs, 0, 0);
|
||||
}
|
||||
if (oldFromNum != fromNum) { // We don't want to generate extra notifies for multiple new packets
|
||||
fromNumChanged.notifyObservers(fromNum);
|
||||
oldFromNum = fromNum;
|
||||
int result = fromNumChanged.notifyObservers(fromNum);
|
||||
if (result == 0) // If any observer returns non-zero, we will try again
|
||||
oldFromNum = fromNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user