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: