Add patch to maybe fix connection crashes?

This commit is contained in:
Michael Catanzaro 2023-04-21 12:52:35 -05:00
parent 049bcc76b6
commit 15848831cd
2 changed files with 31 additions and 0 deletions

28
connection-crashes.patch Normal file
View File

@ -0,0 +1,28 @@
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

View File

@ -9,6 +9,9 @@ License: LGPL-2.0-or-later
URL: https://wiki.gnome.org/Projects/libsoup
Source0: https://download.gnome.org/sources/libsoup/3.4/libsoup-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/367
Patch0: connection-crashes.patch
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: glib-networking