mirror of
https://github.com/ChronosX88/KademliaDHT.git
synced 2024-11-22 02:02:21 +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;
|
Contact stalest = null;
|
||||||
for (Contact tmp : this.contacts)
|
for (Contact tmp : this.contacts)
|
||||||
{
|
{
|
||||||
if (tmp.staleCount() > this.config.stale())
|
if (tmp.staleCount() >= this.config.stale())
|
||||||
{
|
{
|
||||||
/* Contact is stale */
|
/* Contact is stale */
|
||||||
if (stalest == null)
|
if (stalest == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user