Permalink
Browse files

Drop FailQty

  • Loading branch information...
vshymanskyy committed Mar 17, 2013
1 parent 965750d commit 4e6f7df55da40f7abfc6d52d42f37e1da8f08bae
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/KadOpMgr.h
View
@@ -349,7 +349,8 @@ class KadOpMgr {
return;
}
- //XThread::SleepMs(RandRange(0,8));
+ if (RandRange(0,100) < 30) return;
+ //XThread::SleepMs(RandRange(0,600));
KadMsg req = msg.get().via.array.ptr[0].convert();
@@ -361,6 +362,11 @@ class KadOpMgr {
mLock.Lock();
KadContactPtr contact = FindAddContact(req.mSrcId, from);
+ if (contact->IsStale()) {
+ LOG(mLog, "Return: " << contact->mAddrExt.ToString());
+ contact->mFailQty = 0;
+ }
+
mLock.Unlock();
switch (req.mMsgType) {
@@ -709,7 +715,7 @@ class KadOpMgr {
private:
XList<ReqTracker*> mOps;
- XTimerContext mTimeoutTimers;
+ //XTimerContext mTimeoutTimers;
XTimerContext mPeriodicTimers;
KadRtNode mRoutingTable;

0 comments on commit 4e6f7df

Please sign in to comment.