mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-05 09:43:54 +02:00
cleanup messages to send if session was terminated
This commit is contained in:
parent
361f364966
commit
f04048717d
2 changed files with 10 additions and 2 deletions
libi2pd
|
@ -376,7 +376,11 @@ namespace transport
|
|||
|
||||
void SSU2Session::SendI2NPMessages (std::list<std::shared_ptr<I2NPMessage> >& msgs)
|
||||
{
|
||||
if (m_State == eSSU2SessionStateTerminated || msgs.empty ()) return;
|
||||
if (m_State == eSSU2SessionStateTerminated || msgs.empty ())
|
||||
{
|
||||
msgs.clear ();
|
||||
return;
|
||||
}
|
||||
bool empty = false;
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_IntermediateQueueMutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue