SSU2: Set _lastACKSend

This commit is contained in:
zzz
2022-03-17 16:08:15 -04:00
parent f57abe84bd
commit c2ec6cdeff
2 changed files with 3 additions and 5 deletions

View File

@@ -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)

View File

@@ -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; }
/**