From 15848831cde67c79c965aa5555552f8fddee277f Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Fri, 21 Apr 2023 12:52:35 -0500 Subject: [PATCH] Add patch to maybe fix connection crashes? --- connection-crashes.patch | 28 ++++++++++++++++++++++++++++ libsoup3.spec | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 connection-crashes.patch diff --git a/connection-crashes.patch b/connection-crashes.patch new file mode 100644 index 0000000..4c777fe --- /dev/null +++ b/connection-crashes.patch @@ -0,0 +1,28 @@ +From a15107a70b4b2b0b5bda241f037d09af403db96e Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos +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 + diff --git a/libsoup3.spec b/libsoup3.spec index 1729122..691251e 100644 --- a/libsoup3.spec +++ b/libsoup3.spec @@ -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