mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-10-22 22:11:26 +00:00
Report failure on mutex timeout in discoverServices
Previously, a mutex timeout left characteristic caches empty but still signalled success to callers, making all GATT ops silently fail for the connection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c0dd227f4
commit
d9883c9e36
1 file changed
+8
@@ -1509,6 +1509,14 @@ bool NimBLEPlatform::discoverServices(uint16_t conn_handle) {
|
||||
}
|
||||
}
|
||||
xSemaphoreGive(_conn_mutex);
|
||||
} else {
|
||||
WARNING("NimBLEPlatform::discoverServices: mutex timeout, handle=" +
|
||||
std::to_string(conn_handle));
|
||||
if (_on_services_discovered) {
|
||||
ConnectionHandle conn = getConnection(conn_handle);
|
||||
_on_services_discovered(conn, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG("NimBLEPlatform: Services discovered for " + std::to_string(conn_handle));
|
||||
|
||||
Reference in new issue
Block a user