Fix memory leak

This commit is contained in:
2026-07-10 11:52:08 -03:00
parent 1e9cef9e02
commit 0b80a69192
9 changed files with 608 additions and 7 deletions
+11
View File
@@ -23,6 +23,14 @@ const (
defaultNativeXHTTPMaxSessions = 16384
defaultNativeXHTTPBufferedPosts = 512
// Connected XHTTP sessions are torn down primarily by request-context
// cancellation. This idle timeout is the backstop that reaps a connected
// session whose client vanished without the transport ever reporting it
// (common for XHTTP behind a CDN, where no TCP FIN reaches the origin).
// Matches the SSH idle default so a genuinely idle-but-live tunnel is not
// closed prematurely.
fixedNativeXHTTPIdleMS = 300000
)
var (
@@ -77,3 +85,6 @@ func nativeXHTTPBufferedPostLimit() int { return defaultNativeXHTTPBufferedPosts
func nativeMuxUDPIdleTimeout() time.Duration {
return fixedNativeMuxUDPIdleMS * time.Millisecond
}
func nativeXHTTPIdleTimeout() time.Duration {
return fixedNativeXHTTPIdleMS * time.Millisecond
}