Browse Source

delete stream in destination's thread

pull/102/head
orignal 10 years ago
parent
commit
c92d99718b
  1. 3
      Destination.cpp
  2. 1
      Streaming.cpp

3
Destination.cpp

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

1
Streaming.cpp

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

Loading…
Cancel
Save