| author | |
| committer | |
| log | d0beb4badb9064893133c996b05c0748317adf24 |
| tree | b13a21d8cf7aabf0ec43e6a70a1f61fbd4f5a6aa |
| parent | 676d7fc63c057d24a3cbaa30b786e63de6f40d4a |
Avoid errors if the socket enters the TIME_WAIT state and we need to
re-execute this test before the OS releases it.
This problem was not really a problem before since the accept()-ed
socket was never closed on the server-side.1 files changed, 1 insertions(+), 1 deletions(-)
lib/std/net/test.zig+1-1| ... | ... | @@ -145,7 +145,7 @@ test "listen on a port, send bytes, receive bytes" { |
| 145 | 145 | |
| 146 | 146 | // Try only the IPv4 variant as some CI builders have no IPv6 localhost |
| 147 | 147 | // configured. |
| 148 | const localhost = try net.Address.parseIp("127.0.0.1", 8080); | |
| 148 | const localhost = try net.Address.parseIp("127.0.0.1", 0); | |
| 149 | 149 | |
| 150 | 150 | var server = net.StreamServer.init(.{}); |
| 151 | 151 | defer server.deinit(); |