feat: gracefully handle servers, which could not be found with the addr

This commit is contained in:
Tamipes 2025-12-11 01:10:58 +01:00
parent 5bfff0a081
commit 0d5fec173d
3 changed files with 56 additions and 27 deletions

View file

@ -151,9 +151,11 @@ impl MinecraftAPI<Server> for McApi {
if status_json.get_players_online() == 0 {
// With this I don't need to specify that StatusTrait
// should be send as well.
// Otherwise I would need to have it be defined as:
// trait StatusTrait: Send { ... }
drop(status_json);
if let Err(err) = server.stop().await {
tracing::error!(
trace = err.get_span_trace(),