diff options
author | Craig Tiller <ctiller@google.com> | 2015-06-16 13:00:27 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-06-16 13:00:27 -0700 |
commit | cdf52bc17296335ad5024f258337576aeb856afc (patch) | |
tree | 1982b25d023eb091630e5f809ff374014262d7fc /src/core/transport/chttp2 | |
parent | 9850510e52713ccaf0e49bfad1b8e68efe65a383 (diff) |
Fixing stuff
Diffstat (limited to 'src/core/transport/chttp2')
-rw-r--r-- | src/core/transport/chttp2/stream_lists.c | 4 | ||||
-rw-r--r-- | src/core/transport/chttp2/writing.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 85f6bd3616..987dc1c11e 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -158,8 +158,8 @@ void grpc_chttp2_list_add_writing_stream( int grpc_chttp2_list_have_writing_streams( grpc_chttp2_transport_writing *transport_writing) { - return stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), - GRPC_CHTTP2_LIST_WRITING); + return !stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), + GRPC_CHTTP2_LIST_WRITING); } int grpc_chttp2_list_pop_writing_stream( diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 6cc19aec83..4b2ee948c7 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -130,12 +130,14 @@ int grpc_chttp2_unlocking_check_writes( transport_global->incoming_window += window_delta; } - return transport_writing->outbuf.length > 0 || + return transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing); } void grpc_chttp2_perform_writes( grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { + GPR_ASSERT(transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing)); + finalize_outbuf(transport_writing); GPR_ASSERT(transport_writing->outbuf.count > 0); |