diff --git a/src/kademlia/core/DefaultConfiguration.java b/src/kademlia/core/DefaultConfiguration.java index 3a7d66e..f9498ed 100644 --- a/src/kademlia/core/DefaultConfiguration.java +++ b/src/kademlia/core/DefaultConfiguration.java @@ -10,7 +10,7 @@ import java.io.File; public class DefaultConfiguration implements KadConfiguration { - private final static long RESTORE_INTERVAL = 5 * 1000; // Default at 1 hour + private final static long RESTORE_INTERVAL = 60 * 1000; // Default at 1 hour private final static long RESPONSE_TIMEOUT = 1500; private final static long OPERATION_TIMEOUT = 30000; private final static int CONCURRENCY = 10; diff --git a/src/kademlia/operation/ConnectOperation.java b/src/kademlia/operation/ConnectOperation.java index f6b8533..117b875 100644 --- a/src/kademlia/operation/ConnectOperation.java +++ b/src/kademlia/operation/ConnectOperation.java @@ -56,7 +56,7 @@ public class ConnectOperation implements Operation, Receiver /* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */ int totalTimeWaited = 0; - int timeInterval = 100; // We re-check every 300 milliseconds + int timeInterval = 50; // We re-check every 300 milliseconds while (totalTimeWaited < this.config.operationTimeout()) { if (error) diff --git a/src/kademlia/operation/ContentLookupOperation.java b/src/kademlia/operation/ContentLookupOperation.java index 479fac8..4eac85a 100644 --- a/src/kademlia/operation/ContentLookupOperation.java +++ b/src/kademlia/operation/ContentLookupOperation.java @@ -108,7 +108,7 @@ public class ContentLookupOperation implements Operation, Receiver /* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */ int totalTimeWaited = 0; - int timeInterval = 100; // We re-check every 300 milliseconds + int timeInterval = 50; // We re-check every 300 milliseconds while (totalTimeWaited < this.config.operationTimeout()) { if (!this.askNodesorFinish()) diff --git a/src/kademlia/operation/NodeLookupOperation.java b/src/kademlia/operation/NodeLookupOperation.java index 474c160..96bbdc4 100644 --- a/src/kademlia/operation/NodeLookupOperation.java +++ b/src/kademlia/operation/NodeLookupOperation.java @@ -99,7 +99,7 @@ public class NodeLookupOperation implements Operation, Receiver /* If we haven't finished as yet, wait for a maximum of config.operationTimeout() time */ int totalTimeWaited = 0; - int timeInterval = 100; // We re-check every 300 milliseconds + int timeInterval = 50; // We re-check every 300 milliseconds while (totalTimeWaited < this.config.operationTimeout()) { if (!this.askNodesorFinish())