Rare panic: a piece is requested that shouldn't have been
This commit is contained in:
parent
e71ba5210e
commit
5eb6b5286e
|
@ -2568,7 +2568,7 @@ func (me *Client) pieceChanged(t *torrent, piece int) {
|
||||||
// TODO: Cancel requests for this piece.
|
// TODO: Cancel requests for this piece.
|
||||||
for r := range conn.Requests {
|
for r := range conn.Requests {
|
||||||
if int(r.Index) == piece {
|
if int(r.Index) == piece {
|
||||||
panic("wat")
|
conn.Cancel(r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conn.pieceRequestOrder.DeletePiece(int(piece))
|
conn.pieceRequestOrder.DeletePiece(int(piece))
|
||||||
|
|
Loading…
Reference in New Issue