[glib-networking/wip/nacho/fix-libsoup-loop] openssl: fix write loop in libsoup
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/nacho/fix-libsoup-loop] openssl: fix write loop in libsoup
- Date: Fri, 13 Mar 2020 09:46:07 +0000 (UTC)
commit 7cad7d4aa5236b27769a49485a7e25940e8d6901
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Fri Mar 13 10:43:39 2020 +0100
openssl: fix write loop in libsoup
if we get a disconnection and we get broken pipe we
should treat it as an error. Otherwise if we pop up that it
is not an error and we return 0 written bytes we might
endup with a retry from the caller and endup with a write / read
loop.
tls/openssl/gtlsconnection-openssl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index f07be5a..cb4129b 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -125,8 +125,7 @@ end_openssl_io (GTlsConnectionOpenssl *openssl,
/* This case is documented that it may happen and that is perfectly fine */
if (err_code == SSL_ERROR_SYSCALL &&
- ((priv->shutting_down && !my_error) ||
- g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE)))
+ (priv->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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]