SSU: Reduce max establishment time

This commit is contained in:
zzz
2022-07-19 12:08:26 -04:00
parent 5355ee7740
commit af8272b970
2 changed files with 4 additions and 3 deletions

View File

@@ -143,13 +143,14 @@ class EstablishmentManager {
* But SSU probably isn't higher priority than NTCP.
* And it's important to not fail an establishment too soon and waste it.
*/
private static final int MAX_OB_ESTABLISH_TIME = 35*1000;
private static final int MAX_OB_ESTABLISH_TIME = 25*1000;
/**
* Kill any inbound that takes more than this
* One round trip (Created-Confirmed)
* Note: could be two round trips for SSU2 with retry
*/
private static final int MAX_IB_ESTABLISH_TIME = 15*1000;
public static final int MAX_IB_ESTABLISH_TIME = 12*1000;
/** max before receiving a response to a single message during outbound establishment */
public static final int OB_MESSAGE_TIMEOUT = 15*1000;

View File

@@ -112,7 +112,7 @@ class InboundEstablishState {
* max delay including backoff
* This should be a little shorter than for outbound.
*/
protected static final long MAX_DELAY = 12*1000;
protected static final long MAX_DELAY = EstablishmentManager.MAX_IB_ESTABLISH_TIME;
/**
* @param localPort Must be our external port, otherwise the signature of the