Skip to content

Commit dfe1d0e

Browse files
committed
Fix issue with self.bad not being used at all
1 parent 51f9972 commit dfe1d0e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/server.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,14 +586,18 @@ impl Server {
586586
/// Server & client are out of sync, we must discard this connection.
587587
/// This happens with clients that misbehave.
588588
pub fn is_bad(&self) -> bool {
589+
if self.bad {
590+
return self.bad;
591+
};
592+
589593
if let Some(cached_resolver) = CACHED_RESOLVER.load().as_ref() {
590594
if let Some(addr_set) = &self.addr_set {
591595
return cached_resolver
592596
.load()
593597
.has_changed(self.address.host.as_str(), addr_set);
594598
}
595599
}
596-
self.bad
600+
false
597601
}
598602

599603
/// Get server startup information to forward it to the client.

0 commit comments

Comments
 (0)