mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-15 02:21:20 +00:00
send interested if we sent max requests before
This commit is contained in:
@@ -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 ())
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user