fix DDoS when no data received from remote, better logging

This commit is contained in:
ari melody 2026-04-17 15:58:03 +01:00
parent fc34b1e328
commit 9426d23913
Signed by: ari
GPG key ID: CF99829C92678188
2 changed files with 48 additions and 29 deletions

View file

@ -136,7 +136,10 @@ env!("CARGO_PKG_VERSION"));
let address = addrs_iter.next().unwrap();
match MinecraftStatus::fetch(address) {
Err(_) => {
Err(e) => {
println!(
"Failed to connect to {} ({}): {}",
query_address, address, e);
response.status(StatusCode::InternalServerError);
query_response = format!(
"<hr/>