Ver código fonte

net: these lines aren't needed. The enable/disable guard is simply for channel message logging. The other info is still accessible and adds no costs.

x 3 anos atrás
pai
commit
977f3027ff
1 arquivos alterados com 3 adições e 5 exclusões
  1. 3 5
      src/net/p2p.rs

+ 3 - 5
src/net/p2p.rs

@@ -384,11 +384,9 @@ impl P2p {
     pub async fn dnet_info(&self) -> Vec<DnetInfo> {
     pub async fn dnet_info(&self) -> Vec<DnetInfo> {
         let mut ret = vec![];
         let mut ret = vec![];
 
 
-        if *self.dnet_enabled.lock().await {
-            ret.push(self.session_inbound().await.dnet_info().await);
-            ret.push(self.session_outbound().await.dnet_info().await);
-            ret.push(DnetInfo::Hosts(self.hosts.load_all().await));
-        }
+        ret.push(self.session_inbound().await.dnet_info().await);
+        ret.push(self.session_outbound().await.dnet_info().await);
+        ret.push(DnetInfo::Hosts(self.hosts.load_all().await));
 
 
         ret
         ret
     }
     }