Browse Source

Merge pull request #623 from majestrate/fix_streaming_hang

make sure m_RTO > 0 in Streaming.cpp so it doesn't hang
pull/443/merge
orignal 8 years ago committed by GitHub
parent
commit
50e3d6ff37
  1. 3
      Streaming.cpp

3
Streaming.cpp

@ -658,6 +658,9 @@ namespace stream
void Stream::ScheduleResend () void Stream::ScheduleResend ()
{ {
m_ResendTimer.cancel (); m_ResendTimer.cancel ();
// check for invalid value
if (m_RTO <= 0)
m_RTO = 1;
m_ResendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTO)); m_ResendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTO));
m_ResendTimer.async_wait (std::bind (&Stream::HandleResendTimer, m_ResendTimer.async_wait (std::bind (&Stream::HandleResendTimer,
shared_from_this (), std::placeholders::_1)); shared_from_this (), std::placeholders::_1));

Loading…
Cancel
Save