1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-09 11:27:53 +00:00

resend message immediately if NACK recieved

This commit is contained in:
orignal 2015-03-04 21:55:40 -05:00
parent 7fbe2754a4
commit 9d273acd42

View File

@ -230,6 +230,7 @@ namespace stream
if (nacked) if (nacked)
{ {
LogPrint (eLogDebug, "Packet ", seqn, " NACK"); LogPrint (eLogDebug, "Packet ", seqn, " NACK");
SendPackets (std::vector<Packet *> { *it });
it++; it++;
continue; continue;
} }
@ -399,7 +400,7 @@ namespace stream
auto seqn = it->GetSeqn (); auto seqn = it->GetSeqn ();
if (numNacks + (seqn - nextSeqn) >= 256) if (numNacks + (seqn - nextSeqn) >= 256)
{ {
LogPrint (eLogError, "Number of NACKs exceeds 256"); LogPrint (eLogError, "Number of NACKs exceeds 256. seqn=", seqn, " nextSeqn=", nextSeqn);
htobe32buf (packet + 12, nextSeqn); // change ack Through htobe32buf (packet + 12, nextSeqn); // change ack Through
break; break;
} }