Reviewer comments

pull/19516/head
Yash Tibrewal 6 years ago
parent f44e0c07a7
commit 7cb861ce29
  1. 4
      src/core/lib/iomgr/tcp_posix.cc

@ -437,12 +437,12 @@ static void tcp_do_read(grpc_tcp* tcp) {
struct iovec iov[MAX_READ_IOVEC];
constexpr size_t cmsg_alloc_space =
CMSG_SPACE(sizeof(grpc_core::scm_timestamping)) + CMSG_SPACE(sizeof(int));
char cmsgbuf[cmsg_alloc_space];
ssize_t read_bytes;
size_t total_read_bytes = 0;
size_t iov_len =
std::min<size_t>(MAX_READ_IOVEC, tcp->incoming_buffer->count);
char cmsgbuf[cmsg_alloc_space];
for (size_t i = 0; i < iov_len; i++) {
iov[i].iov_base = GRPC_SLICE_START_PTR(tcp->incoming_buffer->slices[i]);
iov[i].iov_len = GRPC_SLICE_LENGTH(tcp->incoming_buffer->slices[i]);

Loading…
Cancel
Save