mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
check if keys are available before sending termination message
This commit is contained in:
parent
bffeb237de
commit
b3fd8bd0ae
@ -1008,6 +1008,7 @@ namespace transport
|
|||||||
|
|
||||||
void NTCP2Session::SendTermination (NTCP2TerminationReason reason)
|
void NTCP2Session::SendTermination (NTCP2TerminationReason reason)
|
||||||
{
|
{
|
||||||
|
if (!m_SendKey || !m_SendSipKey) return;
|
||||||
uint8_t payload[12] = { eNTCP2BlkTermination, 0, 9 };
|
uint8_t payload[12] = { eNTCP2BlkTermination, 0, 9 };
|
||||||
htobe64buf (payload + 3, m_ReceiveSequenceNumber);
|
htobe64buf (payload + 3, m_ReceiveSequenceNumber);
|
||||||
payload[11] = (uint8_t)reason;
|
payload[11] = (uint8_t)reason;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user