Skip to content

Commit

Permalink
fix: Remove flag check
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Sep 19, 2023
1 parent 3c2adb7 commit d22b2b2
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions extensions/warp-ipfs/src/store/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ use std::{
collections::{hash_map::Entry, HashMap, HashSet},
fmt::Debug,
hash::Hash,
sync::{
atomic::{AtomicBool, Ordering},
Arc,
},
sync::Arc,
time::Duration,
};

Expand Down Expand Up @@ -330,7 +327,6 @@ impl Discovery {
#[derive(Clone)]
pub struct DiscoveryEntry {
ipfs: Ipfs,
discover: Arc<AtomicBool>,
peer_id: PeerId,
config: DiscoveryConfig,
task: Arc<RwLock<Option<JoinHandle<()>>>>,
Expand Down Expand Up @@ -364,7 +360,6 @@ impl DiscoveryEntry {
ipfs: ipfs.clone(),
peer_id,
config,
discover: Arc::default(),
task: Arc::default(),
sender,
relays,
Expand Down Expand Up @@ -392,9 +387,7 @@ impl DiscoveryEntry {
}
}
loop {
if entry.discover.load(Ordering::SeqCst)
&& !ipfs.is_connected(peer_id).await.unwrap_or_default()
{
if !ipfs.is_connected(peer_id).await.unwrap_or_default() {
match entry.config {
// Used for provider. Doesnt do anything right now
// TODO: Maybe have separate provider query in case
Expand Down

0 comments on commit d22b2b2

Please sign in to comment.