Change criteria for resending on NACK to match comment

This commit is contained in:
zab2
2013-07-07 20:13:11 +00:00
parent e9e550fb55
commit aab4a3ab44

View File

@ -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,"+