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) }