]> Sergey Matveev's repositories - btrtrc.git/commit
Fix panic in connection.iterPendingPieces when the info isn't available
authorMatt Joiner <anacrolix@gmail.com>
Thu, 28 Jun 2018 01:12:49 +0000 (11:12 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 28 Jun 2018 01:12:49 +0000 (11:12 +1000)
commit7b924822c712e58d85d920828d821a9b5aafc242
tree0437c6b0d645300fb4cb6b52f38d5c62fffa9ac6
parentbdf8619cf3bb1d024cc4da1f26e050b9f10cbb4b
Fix panic in connection.iterPendingPieces when the info isn't available

Triggered by connection.iterUnbiasedPieceRequestOrder calling Torrent.numPieces. We shouldn't be iterating pieces when there's no info anyway, so don't yield any. Mentioned in https://github.com/anacrolix/torrent/issues/253#issuecomment-400350386.
connection.go