mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
try to resend if window is full
This commit is contained in:
parent
3ae885d120
commit
c3dd7ed73a
1 changed files with 12 additions and 8 deletions
|
@ -284,13 +284,18 @@ namespace transport
|
||||||
for (auto it: msgs)
|
for (auto it: msgs)
|
||||||
m_SendQueue.push_back (it);
|
m_SendQueue.push_back (it);
|
||||||
SendQueue ();
|
SendQueue ();
|
||||||
|
|
||||||
if (m_SendQueue.size () > SSU2_MAX_OUTGOING_QUEUE_SIZE)
|
if (m_SendQueue.size () > 0) // windows is full
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: Outgoing messages queue size to ",
|
if (m_SendQueue.size () <= SSU2_MAX_OUTGOING_QUEUE_SIZE)
|
||||||
GetIdentHashBase64(), " exceeds ", SSU2_MAX_OUTGOING_QUEUE_SIZE);
|
Resend (i2p::util::GetMillisecondsSinceEpoch ());
|
||||||
RequestTermination (eSSU2TerminationReasonTimeout);
|
else
|
||||||
}
|
{
|
||||||
|
LogPrint (eLogWarning, "SSU2: Outgoing messages queue size to ",
|
||||||
|
GetIdentHashBase64(), " exceeds ", SSU2_MAX_OUTGOING_QUEUE_SIZE);
|
||||||
|
RequestTermination (eSSU2TerminationReasonTimeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SSU2Session::SendQueue ()
|
bool SSU2Session::SendQueue ()
|
||||||
|
@ -462,7 +467,6 @@ namespace transport
|
||||||
m_WindowSize >>= 1; // /2
|
m_WindowSize >>= 1; // /2
|
||||||
if (m_WindowSize < SSU2_MIN_WINDOW_SIZE) m_WindowSize = SSU2_MIN_WINDOW_SIZE;
|
if (m_WindowSize < SSU2_MIN_WINDOW_SIZE) m_WindowSize = SSU2_MIN_WINDOW_SIZE;
|
||||||
}
|
}
|
||||||
SendQueue ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSU2Session::ResendHandshakePacket ()
|
void SSU2Session::ResendHandshakePacket ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue