Rare panic: a piece is requested that shouldn't have been

This commit is contained in:
Matt Joiner 2015-05-09 11:52:52 +10:00
parent e71ba5210e
commit 5eb6b5286e
1 changed files with 1 additions and 1 deletions

View File

@ -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))