PeerState.java: rework ACK resend logic
Opened 18 months ago
Last modified 18 months ago
#2650newenhancement
PeerState.java: rework ACK resend logic
Reported by:joggerOwned by:zzz Priority: major Milestone: undecided Component: router/transport Version: 0.9.43 Keywords:
Cc:
Parent Tickets:
Sensitive: no
Description
The current ACK resend logic is a leftover from freenet. Randomised resends over 5 minutes help nothing if we want the resend to prevent a 1000 ms timeout on the other end. Any reasonable assumptions about failure rates lead to the choice between 0 and 1 resends. A single resend costs 4 bytes and possibly prevents a retransmit so this seems to be a good choice for typical error rates around 1%.
So I propose to do a single resend with a gap of ACK_FRQUENCY, which will in almost all cases be fast enough to prevent a possible retransmission and avoid being hit by two consecutive packets failing.