From 960fb407eb362bb0e90326a30a984c1af1e5b0dd Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 8 Jun 2020 18:28:33 +0200 Subject: idevice: Add fix for potential SSL_write timeout error case --- src/idevice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/idevice.c') 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) { -- cgit v1.1-32-gdbae