Skip to content

Commit ebd0151

Browse files
committed
Fix the connect_error test on FreeBSD 15+
On FreeBSD 15, the error code returned in this situation changed. It's now ENETUNREACH. I think that error code is reasonable, and it's documented for connect(2), so we should expect that it might be returned.
1 parent 84c8442 commit ebd0151

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

library/std/src/net/tcp/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ fn connect_error() {
3737
e.kind() == ErrorKind::ConnectionRefused
3838
|| e.kind() == ErrorKind::InvalidInput
3939
|| e.kind() == ErrorKind::AddrInUse
40-
|| e.kind() == ErrorKind::AddrNotAvailable,
40+
|| e.kind() == ErrorKind::AddrNotAvailable
41+
|| e.kind() == ErrorKind::NetworkUnreachable,
4142
"bad error: {} {:?}",
4243
e,
4344
e.kind()

0 commit comments

Comments
 (0)