Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
idevice: Handle -EAGAIN in case usbmuxd_send() returns it
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Nov 19, 2020
1 parent bfaf1a1 commit a8a6c64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/idevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,10 @@ static idevice_error_t internal_connection_send(idevice_connection_t connection,
}

if (connection->type == CONNECTION_USBMUXD) {
int res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes);
int res;
do {
res = usbmuxd_send((int)(long)connection->data, data, len, sent_bytes);
} while (res == -EAGAIN);
if (res < 0) {
debug_info("ERROR: usbmuxd_send returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;
Expand Down

0 comments on commit a8a6c64

Please sign in to comment.