| ... | @@ -220,7 +220,7 @@ pub const Address = extern union { | ... | @@ -220,7 +220,7 @@ pub const Address = extern union { |
| 220 | /// Sets SO_REUSEADDR and SO_REUSEPORT on POSIX. | 220 | /// Sets SO_REUSEADDR and SO_REUSEPORT on POSIX. |
| 221 | /// Sets SO_REUSEADDR on Windows, which is roughly equivalent. | 221 | /// Sets SO_REUSEADDR on Windows, which is roughly equivalent. |
| 222 | reuse_address: bool = false, | 222 | reuse_address: bool = false, |
| 223 | /// Deprecated. Does nothing. | 223 | /// Deprecated. Does the same thing as reuse_address. |
| 224 | reuse_port: bool = false, | 224 | reuse_port: bool = false, |
| 225 | force_nonblocking: bool = false, | 225 | force_nonblocking: bool = false, |
| 226 | }; | 226 | }; |
| ... | @@ -238,7 +238,7 @@ pub const Address = extern union { | ... | @@ -238,7 +238,7 @@ pub const Address = extern union { |
| 238 | }; | 238 | }; |
| 239 | errdefer s.stream.close(); | 239 | errdefer s.stream.close(); |
| 240 | | 240 | |
| 241 | if (options.reuse_address) { | 241 | if (options.reuse_address or options.reuse_port) { |
| 242 | try posix.setsockopt( | 242 | try posix.setsockopt( |
| 243 | sockfd, | 243 | sockfd, |
| 244 | posix.SOL.SOCKET, | 244 | posix.SOL.SOCKET, |