[libsoup/carlosgc/goaway-stream-maxint32] http2: handle the case of last stream id being max int32 in goaway




commit 4d65468375c91e08027894b114043344d1807c80
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Wed Jun 29 14:57:15 2022 +0200

    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

 libsoup/http2/soup-client-message-io-http2.c | 3 +++
 1 file changed, 3 insertions(+)
---
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


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