Skip to content

Commit 7cef9c5

Browse files
committed
f - Platform-specific connect_with_unknown_server
Windows is giving AddrNotAvailable instead of ConnectionRefused. Using an IPv4 address (0.0.0.0) didn't make a difference.
1 parent a2575cc commit 7cef9c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning-block-sync/src/http.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,9 @@ pub(crate) mod client_tests {
563563
#[test]
564564
fn connect_with_unknown_server() {
565565
match HttpClient::connect(("::", 80)) {
566+
#[cfg(target_os = "windows")]
567+
Err(e) => assert_eq!(e.kind(), std::io::ErrorKind::AddrNotAvailable),
568+
#[cfg(not(target_os = "windows"))]
566569
Err(e) => assert_eq!(e.kind(), std::io::ErrorKind::ConnectionRefused),
567570
Ok(_) => panic!("Expected error"),
568571
}

0 commit comments

Comments
 (0)