mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
embed macOS const to avoid platform inconsistency(again)
This commit is contained in:
parent
fb4ad3f5fa
commit
44272fa82f
@ -28,7 +28,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
|
|||||||
}
|
}
|
||||||
|
|
||||||
if config.TcpKeepAliveInterval > 0 {
|
if config.TcpKeepAliveInterval > 0 {
|
||||||
if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil {
|
if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil {
|
||||||
return newError("failed to set TCP_KEEPINTVL", err)
|
return newError("failed to set TCP_KEEPINTVL", err)
|
||||||
}
|
}
|
||||||
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil {
|
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user