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

Skip to content
Snippets Groups Projects
Commit aab4a3ab authored by zab2's avatar zab2
Browse files

Change criteria for resending on NACK to match comment

parent e9e550fb
No related branches found
No related tags found
No related merge requests found
...@@ -157,10 +157,10 @@ class PacketLocal extends Packet implements MessageOutputStream.WriteStatus { ...@@ -157,10 +157,10 @@ class PacketLocal extends Packet implements MessageOutputStream.WriteStatus {
final int cnt = _nackCount.incrementAndGet(); final int cnt = _nackCount.incrementAndGet();
SimpleTimer2.TimedEvent evt = _resendEvent; SimpleTimer2.TimedEvent evt = _resendEvent;
if (cnt >= Connection.FAST_RETRANSMIT_THRESHOLD && evt != null && (!_retransmitted) && if (cnt >= Connection.FAST_RETRANSMIT_THRESHOLD && evt != null && (!_retransmitted) &&
(_numSends == 1 || _lastSend < _context.clock().now() + 4*1000)) { // Don't fast retx if we recently resent it (_numSends == 1 || _lastSend < _context.clock().now() - 4*1000)) { // Don't fast retx if we recently resent it
_retransmitted = true; _retransmitted = true;
evt.reschedule(0); evt.reschedule(0);
// shouldn't ^^^ be clock.now() - 4000 ??? --zab // the predicate used to be '+', changing to '-' --zab
if (_log.shouldLog(Log.DEBUG)) { if (_log.shouldLog(Log.DEBUG)) {
final String log = String.format("%s nacks and retransmits. Criteria: nacks=%d, retransmitted=%b,"+ final String log = String.format("%s nacks and retransmits. Criteria: nacks=%d, retransmitted=%b,"+
......
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