mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 20:44:39 +00:00
make sure m_RTO > 0 in Streaming.cpp so it doesn't hang
This commit is contained in:
parent
5685c376cb
commit
c6556b8442
@ -663,6 +663,9 @@ namespace stream
|
|||||||
void Stream::ScheduleResend ()
|
void Stream::ScheduleResend ()
|
||||||
{
|
{
|
||||||
m_ResendTimer.cancel ();
|
m_ResendTimer.cancel ();
|
||||||
|
// check for invalid value
|
||||||
|
if (m_RTO <= 0)
|
||||||
|
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));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user