From f344e29a0944be17e6b9eb41f792d2c90cb639db Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 20 Nov 2021 16:52:42 +0000 Subject: [PATCH] embed macOS const to avoid platform inconsistency(again) --- transport/internet/sockopt_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/internet/sockopt_darwin.go b/transport/internet/sockopt_darwin.go index dcf20a877..1e9bfc89a 100644 --- a/transport/internet/sockopt_darwin.go +++ b/transport/internet/sockopt_darwin.go @@ -28,7 +28,7 @@ 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 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil { return newError("failed to set TCP_KEEPINTVL", err) } if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil {