Merge pull request #676 from majestrate/utp-timeout-2019-07-01

relax timeouts for handshake and make format
pull/677/head
Jeff 5 years ago committed by GitHub
commit 94cf18e3af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,7 +82,7 @@ namespace llarp
{
OnLinkEstablished(p);
metrics::integerTick("utp.session.open", "to", 1, "id",
RouterID(remoteRC.pubkey).ToString());
RouterID(remoteRC.pubkey).ToString());
OutboundHandshake();
}
@ -193,9 +193,16 @@ namespace llarp
return true;
if(state == eConnecting)
return now - lastActive > 5000;
if(now <= lastSend)
return false;
return now - lastSend > 30000;
if(state == eSessionReady)
{
if(now <= lastSend)
return false;
return now - lastSend > 30000;
}
if(state == eLinkEstablished)
return now - lastActive
> 10000; /// 10 second timeout for the whole handshake
return true;
}
PubKey
@ -591,7 +598,7 @@ namespace llarp
if(remoteRC.IsPublicRouter())
{
metrics::integerTick("utp.session.close", "to", 1, "id",
RouterID(remoteRC.pubkey).ToString());
RouterID(remoteRC.pubkey).ToString());
}
}
}

Loading…
Cancel
Save