channel: remove redundant calls to self.stop()

self.stop() stops the main_receive_loop(), so we can just exit function with Error::ChannelStopped.
This commit is contained in:
draoi
2024-08-08 09:14:19 +02:00
parent 6c7e190a0e
commit 497fe1d06f

View File

@@ -368,8 +368,6 @@ impl Channel {
target: "net::channel::main_receive_loop()",
"Stopping channel {:?}", self
);
self.stop().await;
return Err(Error::ChannelStopped)
}
};
@@ -390,7 +388,6 @@ impl Channel {
self.ban(self.address()).await;
}
self.stop().await;
return Err(Error::ChannelStopped)
}
Err(_) => unreachable!("You added a new error in notify()"),