summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/idevice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/idevice.c b/src/idevice.c
index a14fae1..b51f08c 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -559,10 +559,10 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_
while (sent < len) {
#ifdef HAVE_OPENSSL
int c = socket_check_fd((int)(long)connection->data, FDM_WRITE, 100);
- if (c < 0) {
- break;
- } else if (c == 0) {
+ if (c == 0 || c == -ETIMEDOUT || c == -EAGAIN) {
continue;
+ } else if (c < 0) {
+ break;
}
int s = SSL_write(connection->ssl_data->session, (const void*)(data+sent), (int)(len-sent));
if (s <= 0) {