unref before write failures for completness

pull/13391/head
ncteisen 7 years ago
parent 311fa5f818
commit 588d6d9294
  1. 4
      src/core/lib/iomgr/tcp_posix.cc

@ -589,9 +589,13 @@ static bool tcp_flush(grpc_exec_ctx* exec_ctx, grpc_tcp* tcp,
*error = grpc_error_set_int(GRPC_OS_ERROR(errno, "sendmsg"),
GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
grpc_slice_buffer_reset_and_unref_internal(exec_ctx,
tcp->outgoing_buffer);
return true;
} else {
*error = tcp_annotate_error(GRPC_OS_ERROR(errno, "sendmsg"), tcp);
grpc_slice_buffer_reset_and_unref_internal(exec_ctx,
tcp->outgoing_buffer);
return true;
}
}

Loading…
Cancel
Save