Browse Source

teminate session after 5 unacked resends

pull/1774/head
orignal 2 years ago
parent
commit
bb6227281a
  1. 8
      libi2pd/SSU2Session.cpp

8
libi2pd/SSU2Session.cpp

@ -325,7 +325,13 @@ namespace transport
if (ts >= it->second->nextResendTime) if (ts >= it->second->nextResendTime)
{ {
if (it->second->numResends > SSU2_MAX_NUM_RESENDS) if (it->second->numResends > SSU2_MAX_NUM_RESENDS)
it = m_SentPackets.erase (it); {
LogPrint (eLogInfo, "SSU2: Packet was not Acked after ", it->second->numResends, " attempts. Terminate session");
m_SentPackets.clear ();
m_SendQueue.clear ();
RequestTermination ();
return;
}
else else
{ {
uint32_t packetNum = SendData (it->second->payload, it->second->payloadSize); uint32_t packetNum = SendData (it->second->payload, it->second->payloadSize);

Loading…
Cancel
Save