Sfoglia il codice sorgente

fud: add missing `channel_sub.unsubscribe()`

darkfi 1 anno fa
parent
commit
540a77aacb
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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;
             }