From 942fbb37ec46f1907e57a04c44ca790bd47ed52c Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 23 May 2023 17:56:00 +0100 Subject: core: Use SO_REUSEPORT_LB on FreeBSD (#5554) to balance load between threads. --- listen_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'listen_unix.go') diff --git a/listen_unix.go b/listen_unix.go index 50d9a66..7011a1e 100644 --- a/listen_unix.go +++ b/listen_unix.go @@ -119,7 +119,7 @@ func reusePort(network, address string, conn syscall.RawConn) error { return nil } return conn.Control(func(descriptor uintptr) { - if err := unix.SetsockoptInt(int(descriptor), unix.SOL_SOCKET, unix.SO_REUSEPORT, 1); err != nil { + if err := unix.SetsockoptInt(int(descriptor), unix.SOL_SOCKET, unixSOREUSEPORT, 1); err != nil { Log().Error("setting SO_REUSEPORT", zap.String("network", network), zap.String("address", address), -- cgit v1.2.3