forked from I2P_Developers/i2p.i2p
SSU2: Set _lastACKSend
This commit is contained in:
@@ -109,7 +109,7 @@ public class PeerState {
|
||||
private final Queue<ResendACK> _currentACKsResend;
|
||||
|
||||
/** when did we last send ACKs to the peer? */
|
||||
private volatile long _lastACKSend;
|
||||
protected volatile long _lastACKSend;
|
||||
/** when did we decide we need to ACK to this peer? */
|
||||
protected volatile long _wantACKSendSince;
|
||||
/** have we received a packet with the ECN bit set in the current second? */
|
||||
@@ -358,8 +358,6 @@ public class PeerState {
|
||||
_sendWindowBytes = 4 * _mtu;
|
||||
_sendWindowBytesRemaining = _sendWindowBytes;
|
||||
|
||||
_lastACKSend = -1;
|
||||
|
||||
_rto = INIT_RTO;
|
||||
_rtt = INIT_RTT;
|
||||
if (rtt > 0)
|
||||
@@ -409,8 +407,6 @@ public class PeerState {
|
||||
_sendWindowBytes = 3 * _mtu;
|
||||
_sendWindowBytesRemaining = _sendWindowBytes;
|
||||
|
||||
_lastACKSend = -1;
|
||||
|
||||
_rto = INIT_RTO;
|
||||
_rtt = INIT_RTT;
|
||||
if (rtt > 0)
|
||||
|
||||
@@ -274,9 +274,11 @@ public class PeerState2 extends PeerState implements SSU2Payload.PayloadCallback
|
||||
synchronized(this) {
|
||||
// cancel the ack timer
|
||||
_wantACKSendSince = 0;
|
||||
_lastACKSend = _context.clock().now();
|
||||
}
|
||||
return _receivedMessages;
|
||||
}
|
||||
|
||||
SSU2Bitfield getAckedMessages() { return _ackedMessages; }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user