mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
check if session is terminated before sending
This commit is contained in:
parent
b57152cc25
commit
34dc6fbdc1
@ -992,6 +992,11 @@ namespace transport
|
|||||||
|
|
||||||
void NTCP2Session::EncryptAndSendNextBuffer (size_t payloadLen)
|
void NTCP2Session::EncryptAndSendNextBuffer (size_t payloadLen)
|
||||||
{
|
{
|
||||||
|
if (IsTerminated ())
|
||||||
|
{
|
||||||
|
delete[] m_NextSendBuffer; m_NextSendBuffer = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
// encrypt
|
// encrypt
|
||||||
uint8_t nonce[12];
|
uint8_t nonce[12];
|
||||||
CreateNonce (m_SendSequenceNumber, nonce); m_SendSequenceNumber++;
|
CreateNonce (m_SendSequenceNumber, nonce); m_SendSequenceNumber++;
|
||||||
|
Loading…
Reference in New Issue
Block a user