summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-03-25 17:20:16 -0700
committerAdin Scannell <ascannell@google.com>2020-04-08 10:14:34 -0700
commit867eeb18d8c65019fb755194d5bdf768837f07a8 (patch)
treead655bb09e51c27f29b169e422a69458a9ae1044 /pkg/tcpip/network
parentf888b9ce83c202bb77c1e29c3ee60cc485906536 (diff)
Remove lostcancel warnings.
Updates #2243
Diffstat (limited to 'pkg/tcpip/network')
-rw-r--r--pkg/tcpip/network/arp/arp_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/tcpip/network/arp/arp_test.go b/pkg/tcpip/network/arp/arp_test.go
index b3e239ac7..1646d9cde 100644
--- a/pkg/tcpip/network/arp/arp_test.go
+++ b/pkg/tcpip/network/arp/arp_test.go
@@ -138,7 +138,8 @@ func TestDirectRequest(t *testing.T) {
// Sleep tests are gross, but this will only potentially flake
// if there's a bug. If there is no bug this will reliably
// succeed.
- ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond)
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
+ defer cancel()
if pkt, ok := c.linkEP.ReadContext(ctx); ok {
t.Errorf("stackAddrBad: unexpected packet sent, Proto=%v", pkt.Proto)
}