KadBucket Bug

- We were checking if the contact stale count was ">" stale value rather than ">=" stale value
This commit is contained in:
Joshua Kissoon 2014-05-10 20:36:39 +05:30
parent 673979c29a
commit ed0a833e1a

View File

@ -66,7 +66,7 @@ public class KadBucketImpl implements KadBucket
Contact stalest = null;
for (Contact tmp : this.contacts)
{
if (tmp.staleCount() > this.config.stale())
if (tmp.staleCount() >= this.config.stale())
{
/* Contact is stale */
if (stalest == null)