1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

also check if we are a public router when checking for timeout in read direction

This commit is contained in:
Jeff Becker 2019-08-08 07:16:47 -04:00
parent da4f1ddb0a
commit 3dd79d7137
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -212,7 +212,9 @@ namespace llarp
// don't time out the connection if backlogged in downstream direction
// for clients dangling off the side of the network
const auto timestamp =
remoteRC.IsPublicRouter() ? lastSend : lastActive;
remoteRC.IsPublicRouter() && GetOurRC().IsPublicRouter()
? lastSend
: lastActive;
if(now <= timestamp)
return false;
return now - timestamp > 30000;