when we have to reestablish an outbound session use a much much higher timeout for restablishment

so it doesn't time out and get into a state that's totally screwed.

add virtual function service::Endpont::DefaultPathAlignmentTimeout() to get the timeout for path alignment
and use it for resetablishing outbound sessions
pull/1634/head
Jeff Becker 3 years ago
parent 50b9b5fd22
commit c834414b47
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -135,6 +135,12 @@ namespace llarp
return m_OwnedRanges;
}
llarp_time_t
DefaultPathAlignmentTimeout() const override
{
return m_PathAlignmentTimeout;
}
/// ip packet against any exit policies we have
/// returns false if this traffic is disallowed by any of those policies
/// returns true otherwise

@ -1850,7 +1850,7 @@ namespace llarp
}
self->m_state->m_PendingTraffic.erase(addr);
},
1500ms);
DefaultPathAlignmentTimeout());
return true;
}
LogDebug("SendOrQueue failed: no inbound/outbound sessions");

@ -306,6 +306,12 @@ namespace llarp
bool
ShouldBuildMore(llarp_time_t now) const override;
virtual llarp_time_t
DefaultPathAlignmentTimeout() const
{
return 10s;
}
bool
EnsurePathTo(
std::variant<Address, RouterID> addr,

Loading…
Cancel
Save