diff options
author | 2017-11-17 11:45:49 -0800 | |
---|---|---|
committer | 2017-11-17 11:45:49 -0800 | |
commit | 692915ee0784909bceabcd67a7350b9f2fc2f501 (patch) | |
tree | 2e3ceaab4350c3cfef226eb46ae1ce51b8c8edf4 /src | |
parent | 34fec74986ec693643b083920496d7c91624a5c8 (diff) |
Swtich to using grpc_bb_take_first
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/iomgr/tcp_posix.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 026c1c0942..212ecd7fc6 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -579,11 +579,9 @@ static bool tcp_flush(grpc_exec_ctx* exec_ctx, grpc_tcp* tcp, // unref all and forget about all slices that have been written to this // point for (size_t idx = 0; idx < unwind_slice_idx; ++idx) { - grpc_slice_unref_internal(exec_ctx, - tcp->outgoing_buffer->slices[idx]); - tcp->outgoing_buffer->count--; + grpc_slice_unref_internal( + exec_ctx, grpc_slice_buffer_take_first(tcp->outgoing_buffer)); } - tcp->outgoing_buffer->slices += unwind_slice_idx; return false; } else if (errno == EPIPE) { *error = grpc_error_set_int(GRPC_OS_ERROR(errno, "sendmsg"), |