Skip to content

Commit

Permalink
chore: wake up task
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Dec 31, 2024
1 parent af800e7 commit 44c05f8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions extensions/warp-ipfs/src/store/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ impl DiscoveryPeerTask {
};

self.ping_fut = Some(Box::pin(fut));

if let Some(waker) = self.waker.take() {
waker.wake();
}
}
}

Expand Down Expand Up @@ -603,6 +607,10 @@ impl DiscoveryTask {
}
DiscoveryConfig::None => {}
}

if let Some(waker) = self.waker.take() {
waker.wake();
}
}

pub fn publish_discovery(&mut self) {
Expand Down Expand Up @@ -657,6 +665,10 @@ impl DiscoveryTask {
};

self.discovery_publish_fut = Some(fut);

if let Some(waker) = self.waker.take() {
waker.wake();
}
}

pub fn dht_discovery(&mut self, namespace: String) {
Expand All @@ -679,6 +691,10 @@ impl DiscoveryTask {
};

self.discovery_fut.replace(Box::pin(fut));

if let Some(waker) = self.waker.take() {
waker.wake();
}
}

pub fn rz_discovery(&mut self, namespace: String, rz_peer_id: PeerId) {
Expand All @@ -699,6 +715,10 @@ impl DiscoveryTask {
Ok::<_, Error>(peers)
};
self.discovery_fut.replace(Box::pin(fut));

if let Some(waker) = self.waker.take() {
waker.wake();
}
}
}

Expand Down

0 comments on commit 44c05f8

Please sign in to comment.