mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-03-29 05:19:50 +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:
@@ -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