mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
use rtt for ack timeout
This commit is contained in:
parent
80f81685d1
commit
49b1e76585
@ -113,7 +113,9 @@ namespace stream
|
|||||||
if (!m_IsAckSendScheduled)
|
if (!m_IsAckSendScheduled)
|
||||||
{
|
{
|
||||||
m_IsAckSendScheduled = true;
|
m_IsAckSendScheduled = true;
|
||||||
m_AckSendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTT/10));
|
auto ackTimeout = m_RTT/10;
|
||||||
|
if (ackTimeout > ACK_SEND_TIMEOUT) ackTimeout = ACK_SEND_TIMEOUT;
|
||||||
|
m_AckSendTimer.expires_from_now (boost::posix_time::milliseconds(ackTimeout));
|
||||||
m_AckSendTimer.async_wait (std::bind (&Stream::HandleAckSendTimer,
|
m_AckSendTimer.async_wait (std::bind (&Stream::HandleAckSendTimer,
|
||||||
shared_from_this (), std::placeholders::_1));
|
shared_from_this (), std::placeholders::_1));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user