mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
more strict connection timeouts
This commit is contained in:
parent
27c101cc32
commit
fa25bfc797
@ -330,7 +330,7 @@ namespace llarp
|
||||
const AddressInfo& addr)
|
||||
{
|
||||
return std::make_shared< OutboundSession >(
|
||||
this, utp_create_socket(_utp_ctx), rc, addr);
|
||||
this, NewSocket(), rc, addr);
|
||||
}
|
||||
|
||||
uint64
|
||||
|
@ -194,10 +194,12 @@ namespace llarp
|
||||
bool
|
||||
Session::TimedOut(llarp_time_t now) const
|
||||
{
|
||||
if(state == eInitial || state == eLinkEstablished)
|
||||
return false;
|
||||
if(state == eConnecting)
|
||||
return now - lastActive > 5000;
|
||||
if(sendq.size() >= MaxSendQueueSize)
|
||||
{
|
||||
if(now <= lastSend)
|
||||
return false;
|
||||
return now - lastSend > 5000;
|
||||
}
|
||||
// let utp manage this
|
||||
|
Loading…
Reference in New Issue
Block a user