Explorar o código

fud: add missing `channel_sub.unsubscribe()`

darkfi hai 1 ano
pai
achega
540a77aacb
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      bin/fud/fud/src/dht.rs

+ 1 - 0
bin/fud/fud/src/dht.rs

@@ -284,6 +284,7 @@ pub trait DhtHandler {
         loop {
             let channel_sub = self.dht().p2p.hosts().subscribe_channel().await;
             let res = channel_sub.receive().await;
+            channel_sub.unsubscribe().await;
             if res.is_err() {
                 continue;
             }