Fix bug that evaluation of Peer::amChoking is negated

This commit is contained in:
Tatsuhiro Tsujikawa
2016-06-05 11:09:30 +09:00
parent b95d7fbfec
commit ef9e67aeb2

View File

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