mirror of https://github.com/aria2/aria2
2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Execute choking algorithm when unchoked and interested peer is disconected. * src/DefaultPeerStorage.ccpull/1/head
parent
0b7033abb7
commit
223621b5bc
|
@ -1,3 +1,9 @@
|
||||||
|
2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Execute choking algorithm when unchoked and interested peer is
|
||||||
|
disconected.
|
||||||
|
* src/DefaultPeerStorage.cc
|
||||||
|
|
||||||
2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-11-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Added testcase for BtNotInterestedMessage from unchoked peer.
|
Added testcase for BtNotInterestedMessage from unchoked peer.
|
||||||
|
|
|
@ -233,6 +233,11 @@ void DefaultPeerStorage::onReturningPeer(const SharedHandle<Peer>& peer)
|
||||||
if(peer->isActive()) {
|
if(peer->isActive()) {
|
||||||
removedPeerSessionDownloadLength += peer->getSessionDownloadLength();
|
removedPeerSessionDownloadLength += peer->getSessionDownloadLength();
|
||||||
removedPeerSessionUploadLength += peer->getSessionUploadLength();
|
removedPeerSessionUploadLength += peer->getSessionUploadLength();
|
||||||
|
// Execute choking algorithm if unchoked and interested peer is
|
||||||
|
// disconnected.
|
||||||
|
if(!peer->amChoking() && peer->peerInterested()) {
|
||||||
|
executeChoke();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue