Remove unnecessary cleanupLocked

handshakeFailed already calls cleanupLocked at the end, there's no need to
cleanup twice the same endpoint.

PiperOrigin-RevId: 446043917
This commit is contained in:
Zeling Feng
2022-05-02 15:29:45 -07:00
committed by gVisor bot
parent f2b6fbb47e
commit 4ee0a226fe
-1
View File
@@ -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
}