diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-08 23:26:51 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-09 21:39:43 +0900 |
| commit | 7989cd898dc0bfef40ab1a7e2b747676620d6517 (patch) | |
| tree | 62552567c7890a84b3acd12c899ff9235e2523ee /src/DHTReplaceNodeTask.cc | |
| parent | 30e0e19e671697f8f62b43b1e03772ad29ca2407 (diff) | |
Use int or int32_t instead of size_t where suitable
Diffstat (limited to 'src/DHTReplaceNodeTask.cc')
| -rw-r--r-- | src/DHTReplaceNodeTask.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/DHTReplaceNodeTask.cc b/src/DHTReplaceNodeTask.cc index 321f5821..163102b0 100644 --- a/src/DHTReplaceNodeTask.cc +++ b/src/DHTReplaceNodeTask.cc @@ -82,12 +82,16 @@ void DHTReplaceNodeTask::onReceived(const DHTPingReplyMessage* message) setFinished(true); } +namespace { +const int MAX_RETRY = 2; +} //namespace + void DHTReplaceNodeTask::onTimeout(const SharedHandle<DHTNode>& node) { ++numRetry_; if(numRetry_ >= MAX_RETRY) { - A2_LOG_INFO(fmt("ReplaceNode: Ping failed %lu times. Replace %s with %s.", - static_cast<unsigned long>(numRetry_), + A2_LOG_INFO(fmt("ReplaceNode: Ping failed %d times. Replace %s with %s.", + numRetry_, node->toString().c_str(), newNode_->toString().c_str())); node->markBad(); |
