SSU: Reduce ack delay to minimize addition to measured RTT

This commit is contained in:
zzz
2022-03-25 05:59:33 -04:00
parent f4eda0551d
commit 2a6dc58659

View File

@ -2297,7 +2297,7 @@ public class PeerState {
private class ACKTimer extends SimpleTimer2.TimedEvent {
public ACKTimer() {
super(_context.simpleTimer2());
long delta = Math.min(_rtt/2, ACK_FREQUENCY);
long delta = Math.max(10, Math.min(_rtt/6, ACK_FREQUENCY));
if (_log.shouldDebug())
_log.debug("Sending delayed ack in " + delta + ": " + PeerState.this);
schedule(delta);