diff --git a/src/net/p2p.rs b/src/net/p2p.rs index b18e4f31a..9d6f7d25c 100644 --- a/src/net/p2p.rs +++ b/src/net/p2p.rs @@ -320,9 +320,11 @@ impl P2p { } /// Return a reference to the dnet subscriber - pub async fn dnet_subscribe(&self) -> Subscription { - self.dnet_sub.clone().subscribe().await + pub fn dnet_sub(&self) -> SubscriberPtr { + self.dnet_sub.clone() } + + /// Send a dnet notification over the subscriber pub async fn dnet_notify(&self, event: DnetEvent) { self.dnet_sub.notify(event).await; }