From 2a543b08aa3c8e6ea54eff544cee8a27ceb80dd4 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 18 Mar 2024 15:48:48 +1100 Subject: [PATCH] Don't reinit gotMetainfoC when invalidating metadata Fixes a data race. --- torrent.go | 1 - 1 file changed, 1 deletion(-) diff --git a/torrent.go b/torrent.go index 757a180c..78b76194 100644 --- a/torrent.go +++ b/torrent.go @@ -363,7 +363,6 @@ func (t *Torrent) invalidateMetadata() { t.metadataCompletedChunks[i] = false } t.nameMu.Lock() - t.gotMetainfoC = make(chan struct{}) t.info = nil t.nameMu.Unlock() } -- 2.48.1