Raise stability threshold and poll less often when network is stable.

This commit is contained in:
akwizgran
2022-05-19 14:19:41 +01:00
parent 963e510c3b
commit 7d336c98e4

View File

@@ -129,7 +129,7 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
* After this many consecutive successful connections to our own hidden * After this many consecutive successful connections to our own hidden
* service we consider the network to be stable. * service we consider the network to be stable.
*/ */
private static final int STABLE_NETWORK_THRESHOLD = 3; private static final int STABLE_NETWORK_THRESHOLD = 10;
/** /**
* After this many consecutive failed connections to our own hidden service * After this many consecutive failed connections to our own hidden service
@@ -142,7 +142,7 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
* to be stable. * to be stable.
*/ */
private static final int POLLING_INTERVAL_STABLE = private static final int POLLING_INTERVAL_STABLE =
(int) MINUTES.toMillis(5); (int) MINUTES.toMillis(10);
/** /**
* How often to poll our own hidden service and our contacts' hidden * How often to poll our own hidden service and our contacts' hidden