mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
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:
@@ -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()"),
|
||||
|
||||
Reference in New Issue
Block a user