Browse Source

correct RTO reset

pull/694/head
orignal 8 years ago
parent
commit
647175cf12
  1. 7
      Streaming.cpp

7
Streaming.cpp

@ -693,8 +693,7 @@ namespace stream
{ {
m_ResendTimer.cancel (); m_ResendTimer.cancel ();
// check for invalid value // check for invalid value
if (m_RTO <= 0) if (m_RTO <= 0) m_RTO = INITIAL_RTO;
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));
@ -901,13 +900,13 @@ namespace stream
if (packet->IsSYN () && !packet->GetSeqn ()) // new incoming stream if (packet->IsSYN () && !packet->GetSeqn ()) // new incoming stream
{ {
uint32_t receiveStreamID = packet->GetReceiveStreamID (); uint32_t receiveStreamID = packet->GetReceiveStreamID ();
if (receiveStreamID == m_LastIncomingReceiveStreamID) /* if (receiveStreamID == m_LastIncomingReceiveStreamID)
{ {
// already pending // already pending
LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists"); LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists");
delete packet; // drop it, because previous should be connected delete packet; // drop it, because previous should be connected
return; return;
} } */
auto incomingStream = CreateNewIncomingStream (); auto incomingStream = CreateNewIncomingStream ();
incomingStream->HandleNextPacket (packet); // SYN incomingStream->HandleNextPacket (packet); // SYN
auto ident = incomingStream->GetRemoteIdentity(); auto ident = incomingStream->GetRemoteIdentity();

Loading…
Cancel
Save