aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-07-06 15:37:28 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-07-06 15:37:28 -0700
commit6f7411fc9c84cc6278286d8b629a53d2103a7725 (patch)
tree764a0d4d30bbf8c68a9ca6f0c2095c8ea33fdf62 /src/core/transport
parentcd54c60c084010012460b80918861b1463797b64 (diff)
Handle settings frame making a stream writable
Diffstat (limited to 'src/core/transport')
-rw-r--r--src/core/transport/chttp2_transport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 7ecc49ed60..5cc4d9b876 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -853,11 +853,19 @@ static void update_global_window(void *args, gpr_uint32 id, void *stream) {
grpc_chttp2_stream *s = stream;
grpc_chttp2_transport_global *transport_global = &t->global;
grpc_chttp2_stream_global *stream_global = &s->global;
+ int was_zero;
+ int is_zero;
GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("settings", transport_global, stream_global,
outgoing_window,
t->parsing.initial_window_update);
+ was_zero = stream_global->outgoing_window <= 0;
stream_global->outgoing_window += t->parsing.initial_window_update;
+ is_zero = stream_global->outgoing_window <= 0;
+
+ if (was_zero && !is_zero) {
+ grpc_chttp2_list_add_writable_stream(transport_global, stream_global);
+ }
}
static void read_error_locked(grpc_chttp2_transport *t) {