From a8958c99a9ecfd0a95dc8194b5a4fd172739b30e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 21 Feb 2024 00:15:33 -0700 Subject: [PATCH] std.net: fix std lib test regression. fixup --- lib/std/net.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/net.zig b/lib/std/net.zig index 3f2f4c3f6c..66b90867c6 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -220,7 +220,7 @@ pub const Address = extern union { /// Sets SO_REUSEADDR and SO_REUSEPORT on POSIX. /// Sets SO_REUSEADDR on Windows, which is roughly equivalent. reuse_address: bool = false, - /// Deprecated. Does nothing. + /// Deprecated. Does the same thing as reuse_address. reuse_port: bool = false, force_nonblocking: bool = false, }; @@ -238,7 +238,7 @@ pub const Address = extern union { }; errdefer s.stream.close(); - if (options.reuse_address) { + if (options.reuse_address or options.reuse_port) { try posix.setsockopt( sockfd, posix.SOL.SOCKET,