Browse Source

don't lost received data

pull/163/head
orignal 10 years ago
parent
commit
9c338a5c81
  1. 17
      Streaming.cpp

17
Streaming.cpp

@ -36,28 +36,29 @@ namespace stream @@ -36,28 +36,29 @@ namespace stream
Stream::~Stream ()
{
Terminate ();
LogPrint (eLogDebug, "Stream deleted");
}
void Stream::Terminate ()
{
m_AckSendTimer.cancel ();
while (!m_ReceiveQueue.empty ())
{
auto packet = m_ReceiveQueue.front ();
m_ReceiveQueue.pop ();
delete packet;
}
m_ReceiveTimer.cancel ();
for (auto it: m_SentPackets)
delete it;
m_SentPackets.clear ();
m_ResendTimer.cancel ();
for (auto it: m_SavedPackets)
delete it;
m_SavedPackets.clear ();
LogPrint (eLogDebug, "Stream deleted");
}
void Stream::Terminate ()
{
m_AckSendTimer.cancel ();
m_ReceiveTimer.cancel ();
m_ResendTimer.cancel ();
}
void Stream::HandleNextPacket (Packet * packet)

Loading…
Cancel
Save