[glib-networking/enable-openssl-tests] Add back the handling of the syscall error



commit 5b8250331f27b286955cf0986794e1e76d908647
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu May 23 17:55:16 2019 +0200

    Add back the handling of the syscall error

 tls/openssl/gtlsconnection-openssl.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index f5fb1dd..b595120 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -106,6 +106,15 @@ end_openssl_io (GTlsConnectionOpenssl  *openssl,
       return status;
     }
 
+  /* This case is documented that it may happen and that is perfectly fine */
+  if (err_code == SSL_ERROR_SYSCALL &&
+      ((shutting_down && !my_error) ||
+       g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE)))
+    {
+      g_clear_error (&my_error);
+      return G_TLS_CONNECTION_BASE_OK;
+    }
+
   err = ERR_get_error ();
   err_lib = ERR_GET_LIB (err);
   reason = ERR_GET_REASON (err);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]