mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
qt-ble: return DC_STATUS_TIMEOUT rather than DC_STATUS_IO on timeout
This didn't use to matter, because none of the BLE-using backends did retry on timeout until recently. But Jef started doing packet sending retry for the Mares Icon backend, and now we should make sure to distinguish the "IO failed" from "IO timed out" cases. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
52105e5217
commit
866ca76a58
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ dc_status_t BLEObject::read(void *data, size_t size, size_t *actual)
|
|||
|
||||
WAITFOR(!receivedPackets.isEmpty(), timeout);
|
||||
if (receivedPackets.isEmpty())
|
||||
return DC_STATUS_IO;
|
||||
return DC_STATUS_TIMEOUT;
|
||||
}
|
||||
|
||||
QByteArray packet = receivedPackets.takeFirst();
|
||||
|
|
Loading…
Reference in a new issue