Mix: Don't panic on SendError in libp2p mix backend (#919)

This commit is contained in:
Youngjoon Lee 2024-11-28 10:36:30 +09:00 committed by GitHub
parent 0ff16ef5f2
commit dc286a967a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -178,7 +178,9 @@ impl MixSwarm {
match event {
SwarmEvent::Behaviour(nomos_mix_network::Event::Message(msg)) => {
tracing::debug!("Received message from a peer: {msg:?}");
self.incoming_message_sender.send(msg).unwrap();
if let Err(e) = self.incoming_message_sender.send(msg) {
tracing::error!("Failed to send incoming message to channel: {e}");
}
}
SwarmEvent::Behaviour(nomos_mix_network::Event::Error(e)) => {
tracing::error!("Received error from mix network: {e:?}");