From 59daf8d87fad99e5209f9300340e081615ca7ce5 Mon Sep 17 00:00:00 2001 From: xqzr <34030394+xqzr@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:13:05 +0800 Subject: [PATCH] Update system_listener.go --- transport/internet/system_listener.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/transport/internet/system_listener.go b/transport/internet/system_listener.go index fa3092a1..7f4d1f0c 100644 --- a/transport/internet/system_listener.go +++ b/transport/internet/system_listener.go @@ -88,10 +88,8 @@ func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *S network = addr.Network() address = addr.String() lc.Control = getControlFunc(ctx, sockopt, dl.controllers) + lc.KeepAlive = time.Duration(-1) if sockopt != nil { - if sockopt.TcpKeepAliveInterval != 0 || sockopt.TcpKeepAliveIdle != 0 { - lc.KeepAlive = time.Duration(-1) - } if sockopt.TcpMptcp { lc.SetMultipathTCP(true) }