Explorar el Código

Fix bug that evaluation of Peer::amChoking is negated

Tatsuhiro Tsujikawa hace 9 años
padre
commit
ef9e67aeb2
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      src/BtInterestedMessage.cc

+ 6 - 2
src/BtInterestedMessage.cc

@@ -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();
   }
 }