Browse Source

handle immediate ack requsted flag in data message. set it in keep-alive

gha
orignal 2 months ago
parent
commit
dc4cd34893
  1. 3
      libi2pd/SSU2Session.cpp

3
libi2pd/SSU2Session.cpp

@ -268,7 +268,7 @@ namespace transport @@ -268,7 +268,7 @@ namespace transport
{
uint8_t payload[20];
size_t payloadSize = CreatePaddingBlock (payload, 20, 8);
SendData (payload, payloadSize);
SendData (payload, payloadSize, SSU2_FLAG_IMMEDIATE_ACK_REQUESTED);
}
}
@ -1503,6 +1503,7 @@ namespace transport @@ -1503,6 +1503,7 @@ namespace transport
return;
}
UpdateNumReceivedBytes (len);
if (header.h.flags[0] & SSU2_FLAG_IMMEDIATE_ACK_REQUESTED) m_IsDataReceived = true;
if (!packetNum || UpdateReceivePacketNum (packetNum))
HandlePayload (payload, payloadSize);
}

Loading…
Cancel
Save