diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-08-29 11:35:02 +0200 |
---|---|---|
committer | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-08-31 11:09:26 +0200 |
commit | be1a70489e314edb3a11ba92e2505733755239a0 (patch) | |
tree | d64040e3993ff0eb176e3a3c9f8dc7da1489edd4 | |
parent | d7e2dc85bed3cee363d014d985785a4dbf1772ed (diff) | |
download | libsoup-be1a70489e314edb3a11ba92e2505733755239a0.tar.gz |
http2: set the IO error for sync requests too
-rw-r--r-- | libsoup/http2/soup-client-message-io-http2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c index c5407bbe..849a9843 100644 --- a/libsoup/http2/soup-client-message-io-http2.c +++ b/libsoup/http2/soup-client-message-io-http2.c @@ -1566,11 +1566,13 @@ io_run_until (SoupClientMessageIOHTTP2 *io, progress = io_run (data, cancellable, &my_error); if (my_error) { - g_propagate_error (error, my_error); - g_object_unref (msg); - return FALSE; + io->is_shutdown = TRUE; + set_io_error (io, my_error); } + if (io->error && !data->error) + data->error = g_error_copy (io->error); + if (data->error) { g_propagate_error (error, g_steal_pointer (&data->error)); g_object_unref (msg); @@ -1707,7 +1709,7 @@ soup_client_message_io_http2_close_async (SoupClientMessageIO *iface, soup_client_message_io_http2_terminate_session (io); if (!io->async) { - g_assert (io->goaway_sent); + g_assert (io->goaway_sent || io->error); return FALSE; } |