diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-06-01 12:46:26 +0200 |
---|---|---|
committer | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-06-30 10:21:23 +0200 |
commit | 674fad688fb0ea8a3b61a78008fac1dd298c4bfc (patch) | |
tree | 75927ee1a75e5218ce3011b4731f2aa902c66917 | |
parent | 26b2db2e2071027112021c1d7b4019ac78da0ef0 (diff) | |
download | libsoup-674fad688fb0ea8a3b61a78008fac1dd298c4bfc.tar.gz |
http2: move debug message about request body data read after early return
In case of cancellation the SoupHTTP2MessageData might have already been
destroyed.
-rw-r--r-- | libsoup/http2/soup-client-message-io-http2.c | 4 |
1 files 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 3164fa06..9d1ea3ec 100644 --- a/libsoup/http2/soup-client-message-io-http2.c +++ b/libsoup/http2/soup-client-message-io-http2.c @@ -999,8 +999,6 @@ on_data_read (GInputStream *source, GError *error = NULL; gssize read = g_input_stream_read_finish (source, res, &error); - h2_debug (data->io, data, "[SEND_BODY] Read %zd", read); - /* This operation may have outlived the message data in which case this will have been cancelled. */ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { @@ -1008,6 +1006,8 @@ on_data_read (GInputStream *source, return; } + h2_debug (data->io, data, "[SEND_BODY] Read %zd", read); + if (read < 0) { g_byte_array_set_size (data->data_source_buffer, 0); data->data_source_error = g_steal_pointer (&error); |