Add better error for logging as well

This commit is contained in:
Sofia 2026-08-09 21:59:50 +03:00
parent 8856300e8f
commit cf9efafd36

View File

@ -35,7 +35,17 @@ impl NetworkManager {
cli.bind_mut().publish_message(
format!(
"Disconnected from: {}, reason: {}",
connection.address, reason
connection.address,
match reason {
teanet::package::CloseReason::InvalidIdentifier(ident) => {
format!(
"Checksum mismatch: {} != {}",
ident,
NetworkManager::identifier()
)
}
_ => reason.to_string(),
}
),
CliColor::Info,
);