mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
correct Ack range
This commit is contained in:
parent
1326597226
commit
45ebfe378b
@ -897,7 +897,7 @@ namespace transport
|
||||
if (*ranges > lastPacketNum) break;
|
||||
lastPacketNum -= *ranges; ranges++; // nacks
|
||||
if (*ranges > lastPacketNum) break;
|
||||
firstPacketNum -= *ranges; ranges++; // acks
|
||||
firstPacketNum = lastPacketNum - *ranges; ranges++; // acks
|
||||
len -= 2;
|
||||
HandleAckRange (firstPacketNum, lastPacketNum);
|
||||
}
|
||||
@ -905,6 +905,7 @@ namespace transport
|
||||
|
||||
void SSU2Session::HandleAckRange (uint32_t firstPacketNum, uint32_t lastPacketNum)
|
||||
{
|
||||
if (firstPacketNum > lastPacketNum) return;
|
||||
auto it = m_SentPackets.begin ();
|
||||
while (it != m_SentPackets.end () && it->first < firstPacketNum) it++; // find first acked packet
|
||||
if (it == m_SentPackets.end ()) return; // not found
|
||||
|
Loading…
Reference in New Issue
Block a user