|
|
@ -425,6 +425,7 @@ namespace transport |
|
|
|
if (ecode != boost::asio::error::operation_aborted) |
|
|
|
if (ecode != boost::asio::error::operation_aborted) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint32_t ts = i2p::util::GetSecondsSinceEpoch (); |
|
|
|
uint32_t ts = i2p::util::GetSecondsSinceEpoch (); |
|
|
|
|
|
|
|
int numResent = 0; |
|
|
|
for (auto it = m_SentMessages.begin (); it != m_SentMessages.end ();) |
|
|
|
for (auto it = m_SentMessages.begin (); it != m_SentMessages.end ();) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (ts >= it->second->nextResendTime) |
|
|
|
if (ts >= it->second->nextResendTime) |
|
|
@ -437,6 +438,7 @@ namespace transport |
|
|
|
try |
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_Session.Send (f->buf, f->len); // resend
|
|
|
|
m_Session.Send (f->buf, f->len); // resend
|
|
|
|
|
|
|
|
numResent++; |
|
|
|
} |
|
|
|
} |
|
|
|
catch (boost::system::system_error& ec) |
|
|
|
catch (boost::system::system_error& ec) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -457,7 +459,13 @@ namespace transport |
|
|
|
else |
|
|
|
else |
|
|
|
it++; |
|
|
|
it++; |
|
|
|
} |
|
|
|
} |
|
|
|
ScheduleResend (); |
|
|
|
if (numResent < MAX_OUTGOING_WINDOW_SIZE) |
|
|
|
|
|
|
|
ScheduleResend (); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LogPrint (eLogError, "SSU: resend window exceeds max size. Session terminated"); |
|
|
|
|
|
|
|
m_Session.Close (); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|