1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 01:27:03 -05:00

Fix log usage

This commit is contained in:
世界 2021-12-12 18:10:21 +08:00
parent e3610870d1
commit fa61371102
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -61,13 +61,13 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
if config.TcpKeepAliveInterval > 0 {
if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil {
return newError("failed to set TCP_KEEPINTVL", err)
return newError("failed to set TCP_KEEPINTVL").Base(err)
}
if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPIDLE, int(config.TcpKeepAliveIdle)); err != nil {
return newError("failed to set TCP_KEEPIDLE", err)
return newError("failed to set TCP_KEEPIDLE").Base(err)
}
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil {
return newError("failed to set SO_KEEPALIVE", err)
return newError("failed to set SO_KEEPALIVE").Base(err)
}
}
}