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