mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
start new tunnel message if remining is too small
This commit is contained in:
parent
6a0174293e
commit
5993cc857a
@ -66,7 +66,7 @@ namespace tunnel
|
||||
// length of bytes doesn't fit full tunnel message
|
||||
// every follow-on fragment adds 7 bytes
|
||||
size_t nonFit = (fullMsgLen + numFollowOnFragments*7) % TUNNEL_DATA_MAX_PAYLOAD_SIZE;
|
||||
if (!nonFit || nonFit > m_RemainingSize)
|
||||
if (!nonFit || nonFit > m_RemainingSize || m_RemainingSize < fullMsgLen/5)
|
||||
{
|
||||
CompleteCurrentTunnelDataMessage ();
|
||||
CreateCurrentTunnelDataMessage ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user