mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
net: Improve log message.
This commit is contained in:
@@ -108,7 +108,7 @@ impl ProtocolPing {
|
||||
// so close the connection.
|
||||
warn!(
|
||||
target: "net::protocol_ping::run_ping_pong()",
|
||||
"Ping-Pong protocol timed out for {}", self.channel.address(),
|
||||
"[P2P] Ping-Pong protocol timed out for {}", self.channel.address(),
|
||||
);
|
||||
self.channel.stop().await;
|
||||
return Err(Error::ChannelStopped)
|
||||
|
||||
@@ -87,7 +87,10 @@ impl<T: Clone> Subscriber<T> {
|
||||
pub async fn notify(&self, message_result: T) {
|
||||
for sub in (*self.subs.lock().await).values() {
|
||||
if let Err(e) = sub.send(message_result.clone()).await {
|
||||
warn!(target: "system::subscriber", "Error returned sending message in notify() call! {}", e);
|
||||
warn!(
|
||||
target: "system::subscriber",
|
||||
"[system::subscriber] Error returned sending message in notify() call: {}", e,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +102,10 @@ impl<T: Clone> Subscriber<T> {
|
||||
}
|
||||
|
||||
if let Err(e) = sub.send(message_result.clone()).await {
|
||||
warn!(target: "system::subscriber", "Error returned sending message in notify_with_exclude() call! {}", e);
|
||||
warn!(
|
||||
target: "system::subscriber",
|
||||
"[system::subscriber] Error returned sending message in notify_with_exclude() call! {}", e,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user