Fix bug that evaluation of Peer::amChoking is negated

pull/675/head
Tatsuhiro Tsujikawa 2016-06-05 11:09:30 +09:00
parent b95d7fbfec
commit ef9e67aeb2
1 changed files with 6 additions and 2 deletions

View File

@ -59,8 +59,12 @@ void BtInterestedMessage::doReceivedAction()
if (isMetadataGetMode()) { if (isMetadataGetMode()) {
return; return;
} }
getPeer()->peerInterested(true);
if (!getPeer()->amChoking()) { auto& peer = getPeer();
peer->peerInterested(true);
if (peer->amChoking()) {
peerStorage_->executeChoke(); peerStorage_->executeChoke();
} }
} }