Browse Source

check if session is terminated before sending

pull/1277/head
orignal 6 years ago
parent
commit
34dc6fbdc1
  1. 5
      libi2pd/NTCP2.cpp

5
libi2pd/NTCP2.cpp

@ -992,6 +992,11 @@ namespace transport @@ -992,6 +992,11 @@ namespace transport
void NTCP2Session::EncryptAndSendNextBuffer (size_t payloadLen)
{
if (IsTerminated ())
{
delete[] m_NextSendBuffer; m_NextSendBuffer = nullptr;
return;
}
// encrypt
uint8_t nonce[12];
CreateNonce (m_SendSequenceNumber, nonce); m_SendSequenceNumber++;

Loading…
Cancel
Save