summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2022-06-29 14:57:15 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2022-06-30 07:35:47 +0000
commita6161e5e227f264cd276abf365f49395fcfa735a (patch)
tree1e7f5d0d85a81439f48be7917335481e02d8d1e3
parent41431bee8f176313bee029c93fe4f3a1b63fa536 (diff)
downloadlibsoup-a6161e5e227f264cd276abf365f49395fcfa735a.tar.gz
http2: handle the case of last stream id being max int32 in goaway
This means it's a graceful goaway and we should not allow new requests, another goaway is expected with the actual last stream id that should be processed. Fixes #233
-rw-r--r--libsoup/http2/soup-client-message-io-http2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 3c524466..39c9eb2f 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -661,6 +661,9 @@ handle_goaway (SoupClientMessageIOHTTP2 *io,
GHashTableIter iter;
SoupHTTP2MessageData *data;
+ if (last_stream_id == G_MAXINT32)
+ return;
+
g_hash_table_iter_init (&iter, io->messages);
while (g_hash_table_iter_next (&iter, NULL, (gpointer*)&data)) {
/* If there is no error it is a graceful shutdown and