mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-13 11:17:53 +00:00
correct RTO reset
This commit is contained in:
parent
5f0a440f0a
commit
647175cf12
@ -693,8 +693,7 @@ namespace stream
|
||||
{
|
||||
m_ResendTimer.cancel ();
|
||||
// check for invalid value
|
||||
if (m_RTO <= 0)
|
||||
m_RTO = 1;
|
||||
if (m_RTO <= 0) m_RTO = INITIAL_RTO;
|
||||
m_ResendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTO));
|
||||
m_ResendTimer.async_wait (std::bind (&Stream::HandleResendTimer,
|
||||
shared_from_this (), std::placeholders::_1));
|
||||
@ -901,13 +900,13 @@ namespace stream
|
||||
if (packet->IsSYN () && !packet->GetSeqn ()) // new incoming stream
|
||||
{
|
||||
uint32_t receiveStreamID = packet->GetReceiveStreamID ();
|
||||
if (receiveStreamID == m_LastIncomingReceiveStreamID)
|
||||
/* if (receiveStreamID == m_LastIncomingReceiveStreamID)
|
||||
{
|
||||
// already pending
|
||||
LogPrint(eLogWarning, "Streaming: Incoming streaming with rSID=", receiveStreamID, " already exists");
|
||||
delete packet; // drop it, because previous should be connected
|
||||
return;
|
||||
}
|
||||
} */
|
||||
auto incomingStream = CreateNewIncomingStream ();
|
||||
incomingStream->HandleNextPacket (packet); // SYN
|
||||
auto ident = incomingStream->GetRemoteIdentity();
|
||||
|
Loading…
Reference in New Issue
Block a user