fix(backend): parse rtorrent version string in health check logs

This commit is contained in:
spinline
2026-02-03 22:09:22 +03:00
parent 8162f0c9ae
commit 4a870d75dd

View File

@@ -104,7 +104,10 @@ async fn main() {
let client = xmlrpc::RtorrentClient::new(&args.socket); let client = xmlrpc::RtorrentClient::new(&args.socket);
// We use a lightweight call to verify connectivity // We use a lightweight call to verify connectivity
match client.call("system.client_version", &[]).await { match client.call("system.client_version", &[]).await {
Ok(v) => tracing::info!("Connected to rTorrent successfully. Version: {}", v), Ok(xml) => {
let version = xmlrpc::parse_string_response(&xml).unwrap_or(xml);
tracing::info!("Connected to rTorrent successfully. Version: {}", version);
}
Err(e) => tracing::error!("Socket exists but failed to connect to rTorrent: {}", e), Err(e) => tracing::error!("Socket exists but failed to connect to rTorrent: {}", e),
} }
} }