]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Don't probe pieces when setting torrent storage
authorMatt Joiner <anacrolix@gmail.com>
Tue, 21 Jul 2015 12:52:43 +0000 (22:52 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 21 Jul 2015 12:52:43 +0000 (22:52 +1000)
It blocks the caller, for potentially quite some time. I've tested without this for some time now.

client.go

index b8112f32affe7ffbb920d3c2e1aded86558a8013..aaa2ee4da7e9c19e49e894f9b668aa2e4ecb4b47 100644 (file)
--- a/client.go
+++ b/client.go
@@ -1882,9 +1882,6 @@ func (cl *Client) setStorage(t *torrent, td data.Data) (err error) {
        if err != nil {
                return
        }
-       for index := range iter.N(t.numPieces()) {
-               cl.pieceChanged(t, index)
-       }
        cl.startTorrent(t)
        return
 }