From dfc518005bf9fd6abdc8dc906d7572f6cc2c5a35 Mon Sep 17 00:00:00 2001 From: Arthur Sfez Date: Tue, 7 Sep 2021 14:05:54 -0700 Subject: Remove protocolMainLoop unused return value PiperOrigin-RevId: 395325998 --- pkg/tcpip/transport/tcp/connect.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index f331655fc..5d8e18484 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -1342,7 +1342,7 @@ func (e *endpoint) protocolMainLoopDone(closeTimer tcpip.Timer) { // protocolMainLoop is the main loop of the TCP protocol. It runs in its own // goroutine and is responsible for sending segments and handling received // segments. -func (e *endpoint) protocolMainLoop(handshake bool, wakerInitDone chan<- struct{}) tcpip.Error { +func (e *endpoint) protocolMainLoop(handshake bool, wakerInitDone chan<- struct{}) { var ( closeTimer tcpip.Timer closeWaker sleep.Waker @@ -1360,7 +1360,7 @@ func (e *endpoint) protocolMainLoop(handshake bool, wakerInitDone chan<- struct{ e.workerCleanup = true e.protocolMainLoopDone(closeTimer) - return err + return } } @@ -1588,7 +1588,7 @@ loop: // endpoint. cleanupOnError(nil) e.protocolMainLoopDone(closeTimer) - return nil + return case StateTimeWait: fallthrough case StateClose: @@ -1597,7 +1597,7 @@ loop: if err := funcs[v].f(); err != nil { cleanupOnError(err) e.protocolMainLoopDone(closeTimer) - return nil + return } } } @@ -1621,7 +1621,7 @@ loop: if e.EndpointState() == StateError { cleanupOnError(nil) e.protocolMainLoopDone(closeTimer) - return nil + return } e.transitionToStateCloseLocked() @@ -1633,8 +1633,6 @@ loop: if reuseTW != nil { reuseTW() } - - return nil } // handleTimeWaitSegments processes segments received during TIME_WAIT -- cgit v1.2.3