diff options
author | Nikias Bassen | 2020-06-08 18:28:33 +0200 |
---|---|---|
committer | Nikias Bassen | 2020-06-08 18:28:33 +0200 |
commit | 960fb407eb362bb0e90326a30a984c1af1e5b0dd (patch) | |
tree | 107262b016af81038e8ee24cefda266b995c982e | |
parent | 604a0a23018df80f24113209f36aa407e1624498 (diff) | |
download | libimobiledevice-960fb407eb362bb0e90326a30a984c1af1e5b0dd.tar.gz libimobiledevice-960fb407eb362bb0e90326a30a984c1af1e5b0dd.tar.bz2 |
idevice: Add fix for potential SSL_write timeout error case
-rw-r--r-- | src/idevice.c | 6 |
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) { |