send keep alive on pump when needed

pull/783/head
Jeff Becker 5 years ago
parent d6ec5e7ed7
commit 7e38a133d8
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -170,6 +170,8 @@ namespace llarp
const auto now = m_Parent->Now();
if(m_State == State::Ready || m_State == State::LinkIntro)
{
if(ShouldPing())
SendKeepAlive();
for(auto itr = m_RXMsgs.begin(); itr != m_RXMsgs.end(); ++itr)
{
if(itr->second.ShouldSendACKS(now))

@ -129,7 +129,7 @@ namespace llarp
auto itr = m_AuthedLinks.begin();
while(itr != m_AuthedLinks.end())
{
if(itr->second.get() && !itr->second->TimedOut(_now))
if(not itr->second->TimedOut(_now))
{
itr->second->Pump();
++itr;
@ -149,7 +149,7 @@ namespace llarp
auto itr = m_Pending.begin();
while(itr != m_Pending.end())
{
if(itr->second.get() && !itr->second->TimedOut(_now))
if(not itr->second->TimedOut(_now))
{
itr->second->Pump();
++itr;

Loading…
Cancel
Save