summaryrefslogtreecommitdiff
path: root/src/BtNotInterestedMessage.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-13 01:25:36 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-04-13 01:25:36 +0000
commitd13c416a945c996316b314999d73511ea3b1ab8a (patch)
tree6e21903df5ea2aa47b1c68cd9f01da82524e25ee /src/BtNotInterestedMessage.cc
parent8b91d22ca43b65eff39944fd1fa02d248bc120c9 (diff)
2008-04-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten choking algorithm. * src/PeerChokeCommand.{cc, h} * src/BtInterestedMessage.cc * src/PeerSessionResource.{cc, h} * src/DefaultPeerStorage.{cc, h} * src/BtNotInterestedMessage.cc * src/DefaultBtMessageDispatcher.{cc, h} * src/BtMessageDispatcher.h * src/Peer.{cc, h} * src/BtLeecherStateChoke.{cc, h} * src/BtSetup.cc * src/BtSeederStateChoke.{cc, h} * src/PeerStorage.h * test/MockPeerStorage.h * test/MockBtMessageDispatcher.h
Diffstat (limited to 'src/BtNotInterestedMessage.cc')
-rw-r--r--src/BtNotInterestedMessage.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/BtNotInterestedMessage.cc b/src/BtNotInterestedMessage.cc
index 1c79d1de..c72556d4 100644
--- a/src/BtNotInterestedMessage.cc
+++ b/src/BtNotInterestedMessage.cc
@@ -37,6 +37,9 @@
#include "DlAbortEx.h"
#include "message.h"
#include "Peer.h"
+#include "BtRegistry.h"
+#include "BtContext.h"
+#include "PeerStorage.h"
namespace aria2 {
@@ -54,6 +57,9 @@ BtNotInterestedMessageHandle BtNotInterestedMessage::create(const unsigned char*
void BtNotInterestedMessage::doReceivedAction() {
peer->peerInterested(false);
+ if(!peer->amChoking()) {
+ PEER_STORAGE(btContext)->executeChoke();
+ }
}
bool BtNotInterestedMessage::sendPredicate() const {