don't save piece block for stopped torrent

This commit is contained in:
orignal committed 2026-10-18 10:40:57 -04:00
1 parent 7dfc05c098
commit 77ebf7516e
1 file changed
+1 -1
+1 -1
View File
@@ -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);