Clash.Meta/common/net/tcp_keepalive_go122.go

11 lines
162 B
Go
Raw Normal View History

//go:build !go1.23
package net
import "net"
2024-08-14 13:01:06 +08:00
func tcpKeepAlive(tcp *net.TCPConn) {
_ = tcp.SetKeepAlive(true)
_ = tcp.SetKeepAlivePeriod(KeepAliveInterval)
}