I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 2a6dc586 authored by zzz's avatar zzz
Browse files

SSU: Reduce ack delay to minimize addition to measured RTT

parent f4eda055
No related branches found
No related tags found
1 merge request!57SSU: Reduce ack delay to minimize addition to measured RTT
...@@ -2297,7 +2297,7 @@ public class PeerState { ...@@ -2297,7 +2297,7 @@ public class PeerState {
private class ACKTimer extends SimpleTimer2.TimedEvent { private class ACKTimer extends SimpleTimer2.TimedEvent {
public ACKTimer() { public ACKTimer() {
super(_context.simpleTimer2()); 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()) if (_log.shouldDebug())
_log.debug("Sending delayed ack in " + delta + ": " + PeerState.this); _log.debug("Sending delayed ack in " + delta + ": " + PeerState.this);
schedule(delta); schedule(delta);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment