Przeglądaj źródła

net/hosts: Fix scheme parsing.

parazyd 3 lat temu
rodzic
commit
113c45b41e
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 1 1
      src/net/channel.rs
  2. 2 1
      src/net/hosts.rs

+ 1 - 1
src/net/channel.rs

@@ -322,7 +322,7 @@ impl Channel {
                     if Self::is_eof_error(&err) {
                         info!(
                             target: "net::channel::main_receive_loop()",
-                            "[net] Channel inbound connecion {} disconnected",
+                            "[net] Channel inbound connection {} disconnected",
                             self.address(),
                         );
                     } else {

+ 2 - 1
src/net/hosts.rs

@@ -52,6 +52,7 @@ impl Hosts {
         if !filtered_addrs.is_empty() {
             let mut addrs_map = self.addrs.write().await;
             for addr in filtered_addrs {
+                debug!(target: "net::hosts::store()", "Inserting {}", addr);
                 addrs_map.insert(addr);
             }
         }
@@ -119,7 +120,7 @@ impl Hosts {
                 }
             }
 
-            match addr.scheme() {
+            match _addr.scheme() {
                 // Validate that the address is an actual onion.
                 #[cfg(feature = "p2p-transport-tor")]
                 "tor" | "tor+tls" => {