From ccbb2dd207635cd1c53d9255a4b82c96e6042b74 Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Wed, 31 Mar 2021 23:42:42 -0700 Subject: [PATCH] Remove TCP transmit zerocopy shutdown when removing TCP endpoint from pollset. (#25782) Previously, we disabled TCP transmit zerocopy and waited for all pending completions when removing a TCP endpoint from a pollset. However, certain transports may do this and then re-add the endpoint to a pollset, in which case zerocopy is no longer active. Instead, here we only shutdown zerocopy if the socket is being torn down. --- src/core/lib/iomgr/tcp_posix.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index a9190109507..13d544eccee 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -1639,7 +1639,6 @@ static void tcp_add_to_pollset_set(grpc_endpoint* ep, static void tcp_delete_from_pollset_set(grpc_endpoint* ep, grpc_pollset_set* pollset_set) { grpc_tcp* tcp = reinterpret_cast(ep); - ZerocopyDisableAndWaitForRemaining(tcp); grpc_pollset_set_del_fd(pollset_set, tcp->em_fd); }