summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-06-08 18:28:33 +0200
committerGravatar Nikias Bassen2020-06-08 18:28:33 +0200
commit960fb407eb362bb0e90326a30a984c1af1e5b0dd (patch)
tree107262b016af81038e8ee24cefda266b995c982e /src
parent604a0a23018df80f24113209f36aa407e1624498 (diff)
downloadlibimobiledevice-960fb407eb362bb0e90326a30a984c1af1e5b0dd.tar.gz
libimobiledevice-960fb407eb362bb0e90326a30a984c1af1e5b0dd.tar.bz2
idevice: Add fix for potential SSL_write timeout error case
Diffstat (limited to 'src')
-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_
559 while (sent < len) { 559 while (sent < len) {
560#ifdef HAVE_OPENSSL 560#ifdef HAVE_OPENSSL
561 int c = socket_check_fd((int)(long)connection->data, FDM_WRITE, 100); 561 int c = socket_check_fd((int)(long)connection->data, FDM_WRITE, 100);
562 if (c < 0) { 562 if (c == 0 || c == -ETIMEDOUT || c == -EAGAIN) {
563 break;
564 } else if (c == 0) {
565 continue; 563 continue;
564 } else if (c < 0) {
565 break;
566 } 566 }
567 int s = SSL_write(connection->ssl_data->session, (const void*)(data+sent), (int)(len-sent)); 567 int s = SSL_write(connection->ssl_data->session, (const void*)(data+sent), (int)(len-sent));
568 if (s <= 0) { 568 if (s <= 0) {