diff --git a/transport/internet/sockopt_linux.go b/transport/internet/sockopt_linux.go index c6ebf891..10b46d2a 100644 --- a/transport/internet/sockopt_linux.go +++ b/transport/internet/sockopt_linux.go @@ -104,5 +104,9 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig) } } + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, unix.SO_REUSEPORT, 1); err != nil { + return newError("failed to set SO_REUSEPORT").Base(err).AtWarning() + } + return nil }