Skip to content

Commit cf4ad6b

Browse files
authored
Rollup merge of #150776 - connect_error-fbsd15, r=Mark-Simulacrum
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.
2 parents ea14ce5 + ebd0151 commit cf4ad6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎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)