Skip to content

Commit

Permalink
Use Wireguard for non-timeout recv
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcoxson committed Sep 1, 2022
1 parent 38d42bd commit 249b9b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/idevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,10 @@ static idevice_error_t internal_connection_receive(idevice_connection_t connecti
return IDEVICE_E_SUCCESS;
}
if (connection->type == CONNECTION_NETWORK) {
int res = socket_receive((int)(long)connection->data, data, len);
if (res < 0) {
debug_info("ERROR: socket_receive returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;
int res = tcp_handle_recv(connection->data, data, len);
if (res < 0) {
debug_info("ERROR: socket_receive returned %d (%s)", res, strerror(-res));
return IDEVICE_E_UNKNOWN_ERROR;
}
*recv_bytes = (uint32_t)res;
return IDEVICE_E_SUCCESS;
Expand Down

0 comments on commit 249b9b5

Please sign in to comment.