From 1f4d88d27048371435c5e69a9933293c5ee12a43 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 6 Aug 2025 20:22:01 +1000 Subject: [PATCH] Fix Torrent.close race in test --- torrent_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/torrent_test.go b/torrent_test.go index 9854f800..eacf5c44 100644 --- a/torrent_test.go +++ b/torrent_test.go @@ -7,7 +7,6 @@ import ( "net" "os" "path/filepath" - "sync" "testing" g "github.com/anacrolix/generics" @@ -247,7 +246,6 @@ func TestRelativeAvailabilityHaveNone(t *testing.T) { err = pc.peerSentHaveNone() tt.cl.unlock() qt.Assert(t, qt.IsNil(err)) - var wg sync.WaitGroup - tt.close(&wg) + tt.Drop() tt.assertAllPiecesRelativeAvailabilityZero() } -- 2.51.0