forked from I2P_Developers/i2p.i2p
Change criteria for resending on NACK to match comment
This commit is contained in:
@ -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,"+
|
||||||
|
Reference in New Issue
Block a user