diff options
author | hozan23 <hozan23@karyontech.net> | 2024-05-22 18:02:51 +0200 |
---|---|---|
committer | hozan23 <hozan23@karyontech.net> | 2024-05-22 18:02:51 +0200 |
commit | 5df6812dd2254b871eb773dc626b89646ca87495 (patch) | |
tree | 18828be9c86aba205d30086f705f2c6e2aeee975 /p2p/src/connector.rs | |
parent | c2860d3266aa1233787400b163d527fdc7dafe61 (diff) |
p2p: monitor system use core::EventSys instead of pubsub pattern
Diffstat (limited to 'p2p/src/connector.rs')
-rw-r--r-- | p2p/src/connector.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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; }; |