From 77ebf7516ea44cfe0960831c9161d20983f64130 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 18 Oct 2026 10:40:57 -0400 Subject: [PATCH] don't save piece block for stopped torrent --- libi2pd_client/Torrents.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd_client/Torrents.cpp b/libi2pd_client/Torrents.cpp index 2dcfaaef..e4ff3ccf 100644 --- a/libi2pd_client/Torrents.cpp +++ b/libi2pd_client/Torrents.cpp @@ -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);