mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +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)
|
||||
{
|
||||
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,
|
||||
shared_from_this (), std::placeholders::_1));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user