seqlen fix in SendQueue

This commit is contained in:
Stephen Birarda 2015-07-31 10:59:06 -07:00
parent ee9ae9ceec
commit e346dbcfee

View file

@ -143,10 +143,6 @@ void SendQueue::run() {
// Record timing // Record timing
_lastSendTimestamp = high_resolution_clock::now(); _lastSendTimestamp = high_resolution_clock::now();
qDebug() << _lastACKSequenceNumber
<< (uint32_t) (_currentSequenceNumber + 1)
<< seqlen(SequenceNumber { (uint32_t) _lastACKSequenceNumber }, _currentSequenceNumber + 1);
bool resentPacket = false; bool resentPacket = false;
while (!resentPacket) { while (!resentPacket) {
@ -195,10 +191,10 @@ void SendQueue::run() {
// break from the while, we didn't resend a packet // break from the while, we didn't resend a packet
break; break;
} }
} }
if (!resentPacket if (!resentPacket
&& seqlen(SequenceNumber { (uint32_t) _lastACKSequenceNumber }, _currentSequenceNumber + 1) <= _flowWindowSize) { && seqlen(SequenceNumber { (uint32_t) _lastACKSequenceNumber }, _currentSequenceNumber) <= _flowWindowSize) {
// we didn't re-send a packet, so time to send a new one // we didn't re-send a packet, so time to send a new one
_packetsLock.lockForWrite(); _packetsLock.lockForWrite();