Require a reason when marking a server bad (#654)

When calling mark_bad require a reason so it can be logged rather than
the generic message
This commit is contained in:
Alec
2023-12-04 19:09:41 -05:00
committed by GitHub
parent bc07dc9c81
commit 4dbef49ec9
4 changed files with 18 additions and 14 deletions

View File

@@ -1279,8 +1279,8 @@ impl Server {
}
/// Indicate that this server connection cannot be re-used and must be discarded.
pub fn mark_bad(&mut self) {
error!("Server {:?} marked bad", self.address);
pub fn mark_bad(&mut self, reason: &str) {
error!("Server {:?} marked bad, reason: {}", self.address, reason);
self.bad = true;
}