t.go | 2 ++ diff --git a/t.go b/t.go index afc8feb29e76fd1733ef5732b578ca0fd35b9d2e..4a0f65adcf0836e35e4f65f34497ba220132699e 100644 --- a/t.go +++ b/t.go @@ -18,6 +18,8 @@ // 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() }