From 5df6812dd2254b871eb773dc626b89646ca87495 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 22 May 2024 18:02:51 +0200 Subject: p2p: monitor system use core::EventSys instead of pubsub pattern --- p2p/src/connector.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'p2p/src/connector.rs') diff --git a/p2p/src/connector.rs b/p2p/src/connector.rs index aea21ab..a44daea 100644 --- a/p2p/src/connector.rs +++ b/p2p/src/connector.rs @@ -87,7 +87,7 @@ impl Connector { match self.dial(endpoint, peer_id).await { Ok(conn) => { self.monitor - .notify(&ConnEvent::Connected(endpoint.clone()).into()) + .notify(ConnEvent::Connected(endpoint.clone())) .await; return Ok(conn); } @@ -97,7 +97,7 @@ impl Connector { } self.monitor - .notify(&ConnEvent::ConnectRetried(endpoint.clone()).into()) + .notify(ConnEvent::ConnectRetried(endpoint.clone())) .await; backoff.sleep().await; @@ -107,7 +107,7 @@ impl Connector { } self.monitor - .notify(&ConnEvent::ConnectFailed(endpoint.clone()).into()) + .notify(ConnEvent::ConnectFailed(endpoint.clone())) .await; self.connection_slots.remove().await; @@ -135,7 +135,7 @@ impl Connector { } selfc .monitor - .notify(&ConnEvent::Disconnected(endpoint.clone()).into()) + .notify(ConnEvent::Disconnected(endpoint.clone())) .await; selfc.connection_slots.remove().await; }; -- cgit v1.2.3