Skip to content

Commit

Permalink
Fix Async-wasi sock_getaddrinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
L-jasmine committed Jul 30, 2024
1 parent 9b5f399 commit b0aa678
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/async-wasi/src/snapshots/preview_1/async_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,7 @@ pub mod addrinfo {
let addr = if node.is_empty() {
None
} else {
// let node = format!("{node}:0");
(node, 0).to_socket_addrs()?.next()
(node, 0).to_socket_addrs()?.find(|addr| addr.is_ipv4())
};

if let Some(std::net::SocketAddr::V4(ipv4)) = addr {
Expand Down

0 comments on commit b0aa678

Please sign in to comment.