mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 01:55:15 +00:00
add valid fast check
This commit is contained in:
parent
fd7140b15e
commit
fa9bf5afc8
@ -1597,6 +1597,15 @@ namespace libtorrent
|
|||||||
&& t->have_piece(index))
|
&& t->have_piece(index))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (index < 0 || index >= int(m_have_piece.size()))
|
||||||
|
{
|
||||||
|
#ifdef TORRENT_VERBOSE_LOGGING
|
||||||
|
(*m_logger) << time_now_string() << " <== INVALID_ALLOWED_FAST [ " << index << " | s: "
|
||||||
|
<< int(m_have_piece.size()) << " ]\n";
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_allowed_fast.push_back(index);
|
m_allowed_fast.push_back(index);
|
||||||
|
|
||||||
// if the peer has the piece and we want
|
// if the peer has the piece and we want
|
||||||
@ -3021,3 +3030,4 @@ namespace libtorrent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user