libsoup3/connection-crashes.patch
2023-04-21 12:53:01 -05:00

29 lines
961 B
Diff

From a15107a70b4b2b0b5bda241f037d09af403db96e Mon Sep 17 00:00:00 2001
From: Carlos Garcia Campos <cgarcia@igalia.com>
Date: Fri, 21 Apr 2023 13:17:55 +0200
Subject: [PATCH] connection: a connection is disconnected state should not be
reusable
This might fix #342
---
libsoup/soup-connection.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index 4007f282..f08108f6 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -1373,7 +1373,8 @@ soup_connection_is_reusable (SoupConnection *conn)
{
SoupConnectionPrivate *priv = soup_connection_get_instance_private (conn);
- return priv->io_data && soup_client_message_io_is_reusable (priv->io_data);
+ return g_atomic_int_get (&priv->state) != SOUP_CONNECTION_DISCONNECTED &&
+ priv->io_data && soup_client_message_io_is_reusable (priv->io_data);
}
GThread *
--
GitLab