Only assert we should be requesting a piece in debug mode
This commit is contained in:
parent
a17e31794c
commit
a6759b321a
@ -572,6 +572,9 @@ func (c *connection) updateRequests() {
|
|||||||
|
|
||||||
func (c *connection) fillRequests() {
|
func (c *connection) fillRequests() {
|
||||||
c.pieceRequestOrder.IterTyped(func(piece int) (more bool) {
|
c.pieceRequestOrder.IterTyped(func(piece int) (more bool) {
|
||||||
|
if c.t.cl.config.Debug && c.t.havePiece(piece) {
|
||||||
|
panic(piece)
|
||||||
|
}
|
||||||
return c.requestPiecePendingChunks(piece)
|
return c.requestPiecePendingChunks(piece)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user