remove tracking of last receiver response from SendQueue

This commit is contained in:
Stephen Birarda 2017-12-14 15:36:56 -08:00
parent 75e56b5daa
commit a5c951a666
2 changed files with 1 additions and 16 deletions

View file

@ -97,9 +97,6 @@ SendQueue::SendQueue(Socket* socket, HifiSockAddr dest, SequenceNumber currentSe
_lastACKSequenceNumber = uint32_t(_currentSequenceNumber);
_hasReceivedHandshakeACK = hasReceivedHandshakeACK;
// default the last receiver response to the current time
_lastReceiverResponse = QDateTime::currentMSecsSinceEpoch();
}
SendQueue::~SendQueue() {
@ -141,9 +138,6 @@ int SendQueue::sendPacket(const Packet& packet) {
}
void SendQueue::ack(SequenceNumber ack) {
// this is a response from the client, re-set our timeout expiry and our last response time
_lastReceiverResponse = QDateTime::currentMSecsSinceEpoch();
if (_lastACKSequenceNumber == (uint32_t) ack) {
return;
}
@ -170,10 +164,7 @@ void SendQueue::ack(SequenceNumber ack) {
_emptyCondition.notify_one();
}
void SendQueue::nak(SequenceNumber start, SequenceNumber end) {
// this is a response from the client, re-set our timeout expiry
_lastReceiverResponse = QDateTime::currentMSecsSinceEpoch();
void SendQueue::nak(SequenceNumber start, SequenceNumber end) {
{
std::lock_guard<std::mutex> nakLocker(_naksLock);
_naks.insert(start, end);
@ -194,9 +185,6 @@ void SendQueue::fastRetransmit(udt::SequenceNumber ack) {
}
void SendQueue::overrideNAKListFromPacket(ControlPacket& packet) {
// this is a response from the client, re-set our timeout expiry
_lastReceiverResponse = QDateTime::currentMSecsSinceEpoch();
{
std::lock_guard<std::mutex> nakLocker(_naksLock);
_naks.clear();
@ -241,8 +229,6 @@ void SendQueue::handshakeACK() {
_hasReceivedHandshakeACK = true;
}
_lastReceiverResponse = QDateTime::currentMSecsSinceEpoch();
// Notify on the handshake ACK condition
_handshakeACKCondition.notify_one();
}

View file

@ -130,7 +130,6 @@ private:
std::atomic<int> _estimatedTimeout { 0 }; // Estimated timeout, set from CC
std::atomic<int> _syncInterval { udt::DEFAULT_SYN_INTERVAL_USECS }; // Sync interval, set from CC
std::atomic<int64_t> _lastReceiverResponse { 0 }; // Timestamp for the last time we got new data from the receiver (ACK/NAK)
std::atomic<int> _flowWindowSize { 0 }; // Flow control window size (number of packets that can be on wire) - set from CC