mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-12-22 15:51:46 +00:00
KadBucket Bug
- We were checking if the contact stale count was ">" stale value rather than ">=" stale value
This commit is contained in:
parent
673979c29a
commit
ed0a833e1a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user