Unify server pinging implementations between app and backend (#5510)

* Improve ping impl to bring parity to app lib impl

* Fix issue with new impl

* fix labrinth compile

* wip: why do servers not provide server info..

* Fix ping impl overriding port

* fix theseus_gui

* remove unneeded recursion lmit
This commit is contained in:
aecsocket
2026-03-13 16:21:09 +00:00
committed by GitHub
parent 991b4d8c13
commit d14360aba5
13 changed files with 246 additions and 225 deletions

View File

@@ -250,8 +250,8 @@ async fn test_status_json_parsing_plain_description() {
let response: StatusResponse = serde_json::from_str(json).unwrap();
assert_eq!(response.version.name, "1.20.4");
assert_eq!(response.version.protocol, 765);
assert_eq!(response.players.max, 100);
assert_eq!(response.players.online, 42);
assert_eq!(response.players.max, Some(100));
assert_eq!(response.players.online, Some(42));
}
#[tokio::test]
@@ -267,7 +267,7 @@ async fn test_status_json_parsing_object_description() {
let response: StatusResponse = serde_json::from_str(json).unwrap();
assert_eq!(response.version.name, "1.19.4");
assert_eq!(response.players.online, 10);
assert_eq!(response.players.online, Some(10));
assert!(response.players.sample.is_some());
assert_eq!(response.players.sample.as_ref().unwrap().len(), 1);
assert_eq!(response.players.sample.as_ref().unwrap()[0].name, "Notch");