Skip to content

Commit

Permalink
Don't reinit gotMetainfoC when invalidating metadata
Browse files Browse the repository at this point in the history
Fixes a data race.
  • Loading branch information
anacrolix committed Mar 18, 2024
1 parent 3b0a78f commit 2a543b0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 2a543b0

Please sign in to comment.