mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-10-08 10:56:13 -08:00
fix(peers): keep TCP hole-punched connections alive with 1s pings (#2632)
Disable ping interval backoff for TCP hole-punched connections so idle connections continue to send keepalive traffic every second. Preserve the existing backoff and loss handling for other connections. Keep randomized backoff above zero and cover the one-second schedule and the existing backoff and loss retry behavior with tests. * refactor(peers): model connection origins at admission Record manual, direct, listener, TCP/UDP hole-punch, and attached origins when constructing peer connections. Derive hole-punch state from this origin instead of maintaining separate mutable flags. Choose the one-second TCP hole-punch ping limit in PeerConn and pass only a maximum interval to the pinger. Keep other origins on the existing backoff schedule without inspecting tunnel type strings. Keep origin selection internal and preserve the dedicated attached admission paths. Update public admission callers and cover origin propagation, relay restrictions, and ping interval limits.
This commit is contained in:
1 parent
6abc3731ae
commit
d3a5ae684a
17 files changed
+256
-117
No files matched your search
@@ -379,7 +379,7 @@ impl NetworkInstanceManager {
|
||||
tokio::select! {
|
||||
biased;
|
||||
_ = retiring.cancelled() => None,
|
||||
result = peer_manager.add_tunnel_as_server(tunnel, true) => Some(result),
|
||||
result = peer_manager.add_tunnel_as_server(tunnel) => Some(result),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user