Explorar o código

embed macOS const to avoid platform inconsistency(again)

Shelikhoo %!s(int64=4) %!d(string=hai) anos
pai
achega
f344e29a09
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      transport/internet/sockopt_darwin.go

+ 1 - 1
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 {