From: Matt Joiner Date: Mon, 4 Nov 2013 13:06:40 +0000 (+1100) Subject: Set the event condition locker in client X-Git-Tag: v1.0.0~1785 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=495082a60ab1a6e08a8517af476bcf10c758e642;p=btrtrc.git Set the event condition locker in client Needed for WaitAll, albeit not actually triggered anywhere yet. --- diff --git a/client.go b/client.go index f2a5d77d..2b0b6d15 100644 --- a/client.go +++ b/client.go @@ -439,6 +439,7 @@ func (cl *Client) TorrentReadAt(ih InfoHash, off int64, p []byte) (n int, err er func (c *Client) Start() { c.mu = &c.Mutex + c.event.L = c.mu c.torrents = make(map[InfoHash]*Torrent) if c.HalfOpenLimit == 0 { c.HalfOpenLimit = 10