From c4a6f66a95ea53098d766aabcb74817f90a2c275 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Mon, 9 May 2016 16:44:06 +1000 Subject: [PATCH] Lock now required around missinggo.Event variables --- t.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t.go b/t.go index afc8feb2..4a0f65ad 100644 --- a/t.go +++ b/t.go @@ -18,6 +18,8 @@ func (t *Torrent) InfoHash() metainfo.Hash { // Returns a channel that is closed when the info (.Info()) for the torrent // has become available. func (t *Torrent) GotInfo() <-chan struct{} { + t.cl.mu.Lock() + defer t.cl.mu.Unlock() return t.gotMetainfo.C() }