mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 12:42:26 +00:00
don't save piece block for stopped torrent
This commit is contained in:
1 parent
7dfc05c098
commit
77ebf7516e
1 file changed
+1
-1
@@ -1815,7 +1815,7 @@ namespace torrents
|
||||
uint32_t index = bufbe32toh (buf);
|
||||
uint32_t offset = bufbe32toh (buf + 4);
|
||||
len -= 8;
|
||||
if (len && index < m_Torrent->GetNumPieces ())
|
||||
if (len && index < m_Torrent->GetNumPieces () && !m_Torrent->IsStopped ())
|
||||
{
|
||||
Piece& piece = m_Torrent->GetPiece (index);
|
||||
piece.BlockReceived (buf + 8, len, offset);
|
||||
|
||||
Reference in new issue
Block a user