Update system_listener.go

pull/4932/head
xqzr 2025-07-25 15:13:05 +08:00 committed by GitHub
parent 9d15ecf1f9
commit 59daf8d87f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

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