From 4ee0a226fe86226766ed02e36d69424214ac9def Mon Sep 17 00:00:00 2001 From: Zeling Feng Date: Mon, 2 May 2022 15:27:07 -0700 Subject: [PATCH] Remove unnecessary cleanupLocked handshakeFailed already calls cleanupLocked at the end, there's no need to cleanup twice the same endpoint. PiperOrigin-RevId: 446043917 --- pkg/tcpip/transport/tcp/endpoint.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index e9509f896..c59a49793 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -2488,7 +2488,6 @@ func (e *endpoint) Shutdown(flags tcpip.ShutdownFlags) tcpip.Error { // method because that method is called during a close(2) (and closing a // connecting socket is not an error). e.handshakeFailed(&tcpip.ErrConnectionReset{}) - e.cleanupLocked() e.waiterQueue.Notify(waiter.WritableEvents | waiter.EventHUp | waiter.EventErr) return nil }