summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2022-03-11 09:53:42 +0100
committerCarlos Garcia Campos <cgarcia@igalia.com>2022-03-11 10:02:00 +0100
commitb90cb7f408e79717c9f5ee104bb0a8ce2d673f68 (patch)
tree55691a9b50bac53db6cdeefdca697fd88c574a1d
parent953285ea6425aed6398d5d6cf65126c89618b252 (diff)
downloadlibsoup-b90cb7f408e79717c9f5ee104bb0a8ce2d673f68.tar.gz
http2: try to write after every data frame read
The flow control is done automatically by nghttp2, window update frames are sent automatically, but we need to write them. So, after every data frame read, we should stry to write in case there's a pending window update.
-rw-r--r--libsoup/http2/soup-client-message-io-http2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 78817b8a..33869caf 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -724,6 +724,8 @@ on_frame_recv_callback (nghttp2_session *session,
soup_http2_message_data_check_status (data);
}
}
+ /* Try to write after every data frame, since nghttp2 might need to send a window update. */
+ io_try_write (io, !data->item->async);
break;
case NGHTTP2_RST_STREAM:
if (frame->rst_stream.error_code != NGHTTP2_NO_ERROR) {