more strict connection timeouts

pull/630/head
Jeff Becker 5 years ago
parent 27c101cc32
commit fa25bfc797
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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…
Cancel
Save