[libsoup/libsoup-3-0] http2: do not send RST_STREAM for already closed sreams
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/libsoup-3-0] http2: do not send RST_STREAM for already closed sreams
- Date: Fri, 2 Sep 2022 10:20:30 +0000 (UTC)
commit e7ac7e35bc815da79e1223cde6f2ee7f11ef4b6d
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue Aug 30 12:41:39 2022 +0200
http2: do not send RST_STREAM for already closed sreams
libsoup/http2/soup-client-message-io-http2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 48ba7d5c..05a8c99a 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -1409,6 +1409,7 @@ soup_client_message_io_http2_finished (SoupClientMessageIO *iface,
SoupMessageIOCompletionFn completion_cb;
gpointer completion_data;
SoupMessageIOCompletion completion;
+ gboolean is_closed;
data = get_data_for_message (io, msg);
@@ -1421,9 +1422,10 @@ soup_client_message_io_http2_finished (SoupClientMessageIO *iface,
g_object_ref (msg);
+ is_closed = nghttp2_session_get_stream_user_data (io->session, data->stream_id) == NULL;
nghttp2_session_set_stream_user_data (io->session, data->stream_id, NULL);
- if (!io->is_shutdown) {
+ if (!io->is_shutdown && !is_closed) {
NGCHECK (nghttp2_submit_rst_stream (io->session, NGHTTP2_FLAG_NONE, data->stream_id,
completion == SOUP_MESSAGE_IO_COMPLETE ?
NGHTTP2_NO_ERROR : NGHTTP2_CANCEL));
soup_http2_message_data_close (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]