summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp
diff options
context:
space:
mode:
authorArthur Sfez <asfez@google.com>2021-09-07 14:05:54 -0700
committergVisor bot <gvisor-bot@google.com>2021-09-07 14:09:00 -0700
commitdfc518005bf9fd6abdc8dc906d7572f6cc2c5a35 (patch)
treec3799badfb7cdad211b7d8c74a2409bfb3ef8186 /pkg/tcpip/transport/tcp
parent775a321120f09420ef37ba9455371f193380a695 (diff)
Remove protocolMainLoop unused return value
PiperOrigin-RevId: 395325998
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go12
1 files 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