summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-02-05 22:45:44 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-05 22:46:35 -0800
commit1b6a12a768216a99a5e0428c42ea4faf79cf3b50 (patch)
tree995d1ae4ba930d3c6b8fde0f3d1651db472c0dba /pkg/tcpip/transport/tcp
parentf3d95607036b8a502c65aa7b3e8145227274dbbc (diff)
Add notes to relevant tests.
These were out-of-band notes that can help provide additional context and simplify automated imports. PiperOrigin-RevId: 293525915
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go
index e4a6b1b8b..f2be0e651 100644
--- a/pkg/tcpip/transport/tcp/endpoint.go
+++ b/pkg/tcpip/transport/tcp/endpoint.go
@@ -2166,6 +2166,9 @@ func (e *endpoint) listen(backlog int) *tcpip.Error {
e.isRegistered = true
e.setEndpointState(StateListen)
+ // The channel may be non-nil when we're restoring the endpoint, and it
+ // may be pre-populated with some previously accepted (but not Accepted)
+ // endpoints.
if e.acceptedChan == nil {
e.acceptedChan = make(chan *endpoint, backlog)
}