delete stream in destination's thread

This commit is contained in:
orignal 2014-10-15 10:34:28 -04:00
parent 03914b4f41
commit c92d99718b
2 changed files with 6 additions and 2 deletions

View file

@ -186,6 +186,9 @@ namespace stream
if (it != m_Streams.end ())
{
m_Streams.erase (it);
if (m_Service)
m_Service->post ([stream](void) { delete stream; });
else
delete stream;
}
}

View file

@ -201,6 +201,7 @@ namespace stream
m_IsReset = true;
m_ReceiveTimer.cancel ();
m_ResendTimer.cancel ();
m_AckSendTimer.cancel ();
}
}