Permalink
Browse files

[InitialSeeding] Announce more pieces earlier

If a peer is downloading and one of his pieces has been successfully
spread throughout the swarm, advertise another piece immediately.
  • Loading branch information...
1 parent b2c6f44 commit 8950e1a036ef5688313bc991831d5e8d096d71cd @alanmcgovern alanmcgovern committed Oct 13, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/MonoTorrent/MonoTorrent.Client/Unchokers/InitialSeedUnchoker.cs
@@ -148,6 +148,8 @@ public void ReceivedHave(PeerId peer, int pieceIndex)
{
data.CurrentPieces[pieceIndex] = false;
data.SharedPieces++;
+ // Give him another piece if no-one else is waiting.
+ TryAdvertisePiece(data);
break;
}
}

0 comments on commit 8950e1a

Please sign in to comment.