[libsoup/carlosgc/http2-io-errors: 7/9] http2: mark IO as shutting down before processing async pending messages




commit dccda60de68ff480c3a0baf69f1b91f6e151c684
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Mon Aug 29 11:35:38 2022 +0200

    http2: mark IO as shutting down before processing async pending messages

 libsoup/http2/soup-client-message-io-http2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 849a9843..528c4e36 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -415,6 +415,8 @@ io_read_ready (GObject                  *stream,
                 return G_SOURCE_CONTINUE;
         }
 
+        io->is_shutdown = TRUE;
+
         if (error) {
                 set_io_error (io, error);
                 g_list_foreach (io->pending_io_messages,
@@ -422,8 +424,6 @@ io_read_ready (GObject                  *stream,
                                 NULL);
         }
 
-        io->is_shutdown = TRUE;
-
         g_clear_pointer (&io->read_source, g_source_unref);
         if (conn) {
                 soup_connection_set_in_use (conn, FALSE);


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