mihomo/common/net/tcp_keepalive_go122.go
wwqgtxx f20f371a61
Some checks are pending
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run
chore: better keepalive handle
2024-08-14 13:01:06 +08:00

11 lines
162 B
Go

//go:build !go1.23
package net
import "net"
func tcpKeepAlive(tcp *net.TCPConn) {
_ = tcp.SetKeepAlive(true)
_ = tcp.SetKeepAlivePeriod(KeepAliveInterval)
}