mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-01 13:46:50 +00:00
fix: fail to set KeepAliveIntervall #715
This commit is contained in:
1 parent
0dfe696300
commit
fdd327d58d
1 file changed
+1
-1
+1
-1
@@ -51,6 +51,6 @@ func SplitHostPort(s string) (host, port string, hasPort bool, err error) {
|
||||
func TCPKeepAlive(c net.Conn) {
|
||||
if tcp, ok := c.(*net.TCPConn); ok {
|
||||
_ = tcp.SetKeepAlive(true)
|
||||
_ = tcp.SetKeepAlivePeriod(KeepAliveInterval * time.Second)
|
||||
_ = tcp.SetKeepAlivePeriod(KeepAliveInterval)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user