Skip to content

Commit

Permalink
process_message_inner does not need to return Result bcz infallible
Browse files Browse the repository at this point in the history
  • Loading branch information
elderhammer committed Jun 26, 2024
1 parent eb32416 commit 204c110
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions node/bft/src/gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ impl<N: Network> Gateway<N> {
}

/// Processes a message received from the network.
async fn process_message_inner(&self, peer_addr: SocketAddr, message: Event<N>) -> io::Result<()> {
async fn process_message_inner(&self, peer_addr: SocketAddr, message: Event<N>) {
// Process the message. Disconnect if the peer violated the protocol.
if let Err(error) = self.inbound(peer_addr, message).await {
if let Some(peer_ip) = self.resolver.get_listener(peer_addr) {
Expand All @@ -983,7 +983,6 @@ impl<N: Network> Gateway<N> {
});
}
}
Ok(())
}
}

Expand Down

0 comments on commit 204c110

Please sign in to comment.