mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-20 10:12:31 +00:00
don't save piece of removed torrent
This commit is contained in:
@@ -1824,8 +1824,10 @@ namespace torrents
|
||||
if (piece.VerifyHash ())
|
||||
{
|
||||
boost::asio::post (GetTorrentsTunnel ()->GetDiskIOService (),
|
||||
[index, torrent = m_Torrent]() mutable
|
||||
[index, t = std::weak_ptr<Torrent> (m_Torrent)]() mutable
|
||||
{
|
||||
auto torrent = t.lock ();
|
||||
if (!torrent) return; // torrent doesn't exist anymore
|
||||
auto fragments = torrent->GetPieceFileFragments (index);
|
||||
Piece& piece = torrent->GetPiece (index);
|
||||
for (auto& it: fragments)
|
||||
|
||||
Reference in New Issue
Block a user