瀏覽代碼

Fix bug: wrong parenthesis position in the condition

Tatsuhiro Tsujikawa 12 年之前
父節點
當前提交
32a3c441af
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/DHTGetPeersCommand.cc

+ 1 - 1
src/DHTGetPeersCommand.cc

@@ -112,7 +112,7 @@ bool DHTGetPeersCommand::execute()
     lastGetPeerTime_ = global::wallclock();
     lastGetPeerTime_ = global::wallclock();
     if(numRetry_ < MAX_RETRIES &&
     if(numRetry_ < MAX_RETRIES &&
        (btRuntime_->getMaxPeers() == 0 ||
        (btRuntime_->getMaxPeers() == 0 ||
-        btRuntime_->getMaxPeers()) > peerStorage_->countPeer()) {
+        btRuntime_->getMaxPeers() > peerStorage_->countPeer())) {
       ++numRetry_;
       ++numRetry_;
       A2_LOG_DEBUG(fmt("Too few peers. peers=%lu, max_peers=%d."
       A2_LOG_DEBUG(fmt("Too few peers. peers=%lu, max_peers=%d."
                        " Try again(%d)",
                        " Try again(%d)",