From b5c2e7d9eab625bd42a04232da08675a1bf7cfab Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 19 Aug 2026 21:01:50 -0400 Subject: [PATCH] send interested if we sent max requests before --- libi2pd_client/Torrents.cpp | 2 +- libi2pd_client/Torrents.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd_client/Torrents.cpp b/libi2pd_client/Torrents.cpp index 624d672e..0d0ee486 100644 --- a/libi2pd_client/Torrents.cpp +++ b/libi2pd_client/Torrents.cpp @@ -1005,7 +1005,7 @@ namespace torrents if (index < m_RemoteBitfield.size ()) { m_RemoteBitfield.set (index); - if (m_NumRequests < MAX_NUM_REQUESTS && m_Torrent && !m_Torrent->IsComplete ()) + if (m_Torrent && !m_Torrent->IsComplete ()) { Piece& piece = m_Torrent->GetPiece (index); if (!piece.IsComplete ()) diff --git a/libi2pd_client/Torrents.h b/libi2pd_client/Torrents.h index 51db78f2..750a257e 100644 --- a/libi2pd_client/Torrents.h +++ b/libi2pd_client/Torrents.h @@ -264,7 +264,7 @@ namespace torrents uint64_t GetDownloadRate () const { return m_DownloadRate; } uint64_t GetUploadRate () const { return m_UploadRate; } bool IsDownloading () const { return m_NumRequests > 0; } - bool IsUploading () const { return m_NumPieces > 0; } + bool IsUploading () const { return m_NumPieces > 0 || (m_Stream && m_Stream->GetSendBufferSize () > 0); } private: