aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-07-09 17:01:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-07-09 17:01:21 -0700
commit6b7153cc0ded7d56dcb43ca53e925e47f678f5d5 (patch)
tree5491f8b6a37b3d4b5eb78e99b8d829b4f9e5c4d0
parentba90304a0c3918e7fe71619658d15e5074e4129e (diff)
parentf6d875fbe428eac98d964c376ec27237f2266703 (diff)
Merge pull request #2357 from nicolasnoble/backporting-2312
Handle settings frame making a stream writable
-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 322ff39820..ac399e4a1d 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -876,11 +876,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) {