1 parent 337f496 commit 0846c96Copy full SHA for 0846c96
1 file changed
src/dht.rs
@@ -15,7 +15,7 @@ use log::{debug, error, info, trace, warn};
15
const BOOTSTRAP_HOSTS: &[&str] = &["router.bittorrent.com:6881", "router.utorrent.com:6881", "dht.transmissionbt.com:6881", "dht.aelitis.com:6881"];
16
17
async fn resolve_hostname(hostname: &str, want_v4: bool) -> Option<SocketAddr> {
18
- match std::net::ToSocketAddrs::to_socket_addrs(&hostname) {
+ match tokio::net::lookup_host(hostname).await {
19
Ok(addrs) => {
20
for a in addrs {
21
if a.is_ipv4() == want_v4 {
0 commit comments