diff options
author | Craig Tiller <ctiller@google.com> | 2016-02-08 10:24:13 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-02-08 10:24:13 -0800 |
commit | 44d2bf378ec3673380b190e6d817038b8536d5c1 (patch) | |
tree | e22299855c13bb9eb5677017378d88ca094c96f6 /src/core | |
parent | 2c073e361e3fdedbab4b5d43b863ca868f98f8c1 (diff) | |
parent | 766fa227e00b9e3fd299a207bde0e4040ffa0f82 (diff) |
Merge pull request #5114 from yang-g/flushed_too_early
flush the stalled list after the window is updated
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/transport/chttp2/writing.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 095883c66d..cafecf1046 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -75,6 +75,9 @@ int grpc_chttp2_unlocking_check_writes( GRPC_CHTTP2_FLOW_MOVE_TRANSPORT("write", transport_writing, outgoing_window, transport_global, outgoing_window); + bool is_window_available = transport_writing->outgoing_window > 0; + grpc_chttp2_list_flush_writing_stalled_by_transport(transport_writing, + is_window_available); /* for each grpc_chttp2_stream that's become writable, frame it's data (according to available window sizes) and add to the output buffer */ @@ -329,10 +332,6 @@ void grpc_chttp2_cleanup_writing( grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_writing *stream_writing; grpc_chttp2_stream_global *stream_global; - bool is_window_available = transport_writing->outgoing_window > 0; - - grpc_chttp2_list_flush_writing_stalled_by_transport(transport_writing, - is_window_available); while (grpc_chttp2_list_pop_written_stream( transport_global, transport_writing, &stream_global, &stream_writing)) { |