forked from I2P_Developers/i2p.i2p
ticket #1062 - count duplicate packets towards RTT if we have
never sampled it
This commit is contained in:
@ -629,6 +629,10 @@ class ConnectionOptions extends I2PSocketOptionsImpl {
|
||||
computeRTO();
|
||||
}
|
||||
|
||||
public synchronized boolean receivedAck() {
|
||||
return _initState != AckInit.INIT;
|
||||
}
|
||||
|
||||
/** How long after sending a packet will we wait before resending?
|
||||
* @return delay for a retransmission in ms
|
||||
*/
|
||||
|
@ -299,6 +299,7 @@ class ConnectionPacketHandler {
|
||||
return false;
|
||||
|
||||
boolean lastPacketAcked = false;
|
||||
final boolean receivedAck = con.getOptions().receivedAck();
|
||||
if ( (acked != null) && (!acked.isEmpty()) ) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug(acked.size() + " of our packets acked with " + packet);
|
||||
@ -312,7 +313,7 @@ class ConnectionPacketHandler {
|
||||
final int numSends = p.getNumSends();
|
||||
final int ackTime = p.getAckTime();
|
||||
|
||||
if (numSends > 1)
|
||||
if (numSends > 1 && receivedAck)
|
||||
numResends++;
|
||||
else if (ackTime > highestRTT)
|
||||
highestRTT = ackTime;
|
||||
|
Reference in New Issue
Block a user