mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
correct RTO reset
This commit is contained in:
parent
5f0a440f0a
commit
647175cf12
1 changed files with 3 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue