]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Set the event condition locker in client
authorMatt Joiner <anacrolix@gmail.com>
Mon, 4 Nov 2013 13:06:40 +0000 (00:06 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 4 Nov 2013 13:06:40 +0000 (00:06 +1100)
Needed for WaitAll, albeit not actually triggered anywhere yet.

client.go

index f2a5d77d3e789c28e2d6beab32585bab113d4d0f..2b0b6d155c25dbc644a0e0645ef05e008a225ed3 100644 (file)
--- 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