mirror of https://github.com/oxen-io/lokinet
increase default session lifetime to 5 minutes for mobile client related reasons
make the default inbound session lifetime be default session lifetime + 2 ping intervals
This commit is contained in:
parent
a7b20b79c5
commit
60cc47447f
|
@ -5,6 +5,6 @@
|
|||
#include <cstdlib>
|
||||
|
||||
constexpr size_t MAX_LINK_MSG_SIZE = 8192;
|
||||
static constexpr auto DefaultLinkSessionLifetime = 1min;
|
||||
static constexpr auto DefaultLinkSessionLifetime = 5min;
|
||||
constexpr size_t MaxSendQueueSize = 1024 * 16;
|
||||
static constexpr auto LinkLayerConnectTimeout = 5s;
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace llarp
|
|||
/// How often we send a keepalive
|
||||
static constexpr std::chrono::milliseconds PingInterval = 5s;
|
||||
/// How long we wait for a session to die with no tx from them
|
||||
static constexpr auto SessionAliveTimeout = PingInterval * 5;
|
||||
static constexpr auto SessionAliveTimeout = (PingInterval * 2) + DefaultLinkSessionLifetime;
|
||||
|
||||
struct Session : public ILinkSession, public std::enable_shared_from_this<Session>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue