mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
net: p2p.stop() calls channel.stop() on all channels
This commit is contained in:
@@ -159,6 +159,11 @@ impl P2p {
|
||||
|
||||
/// Stop the running P2P subsystem
|
||||
pub async fn stop(&self) {
|
||||
// Stop all channels
|
||||
for channel in self.hosts.channels().await {
|
||||
channel.stop().await;
|
||||
}
|
||||
|
||||
// Stop the sessions
|
||||
self.session_manual().stop().await;
|
||||
self.session_inbound().stop().await;
|
||||
|
||||
@@ -162,7 +162,6 @@ impl Slot {
|
||||
}
|
||||
|
||||
async fn start(self: Arc<Self>) {
|
||||
// TODO: way too many clones, look into making this implicit. See implicit-clone crate
|
||||
let ex = self.p2p().executor();
|
||||
|
||||
self.process.clone().start(
|
||||
|
||||
Reference in New Issue
Block a user