diff options
author | Craig Tiller <ctiller@google.com> | 2017-05-10 13:34:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-10 13:34:32 -0700 |
commit | 025384c5370b783a2b133382557645800f4289e8 (patch) | |
tree | f067d006942e27f61239200f4ece0cb8bb000432 | |
parent | 449bf017e1d19571b5349911b85802f3039dd7a5 (diff) | |
parent | 8ce9a468042c45c84476d53f287b95421cc111e5 (diff) |
Merge pull request #11059 from ctiller/stalls-be-gone
Fix small message streaming ping-pong write count regression
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/parsing.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 30738080ee..3c5216e104 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2554,7 +2554,7 @@ static void incoming_byte_stream_update_flow_control(grpc_exec_ctx *exec_ctx, add_max_recv_bytes); if ((int64_t)s->incoming_window_delta + (int64_t)initial_window_size - (int64_t)s->announce_window > - 2 * (int64_t)initial_window_size) { + (int64_t)initial_window_size / 2) { write_type = GRPC_CHTTP2_STREAM_WRITE_PIGGYBACK; } grpc_chttp2_become_writable(exec_ctx, t, s, write_type, diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index d0b94bd6ce..b0dd685116 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -418,7 +418,10 @@ static grpc_error *update_incoming_window(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_FLOW_DEBIT_STREAM_INCOMING_WINDOW_DELTA("parse", t, s, incoming_frame_size); - if ((int64_t)s->incoming_window_delta - (int64_t)s->announce_window <= 0) { + if ((int64_t)s->incoming_window_delta - (int64_t)s->announce_window <= + -(int64_t)t->settings[GRPC_SENT_SETTINGS] + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] / + 2) { grpc_chttp2_become_writable(exec_ctx, t, s, GRPC_CHTTP2_STREAM_WRITE_INITIATE_UNCOVERED, "window-update-required"); |