warn instead of error on unknown latency

This commit is contained in:
Max Känner 2024-10-06 21:25:17 +02:00
parent f6845b5126
commit e00eefb990

View File

@ -17,7 +17,7 @@ use std::{
time::{Duration, Instant},
};
use log::{error, info};
use log::{error, info, warn};
use ordered_float::OrderedFloat;
use rand::thread_rng;
use serde_json::{json, Value};
@ -141,7 +141,7 @@ pub fn get_move(
|mut guard| {
let target_latency = game.timeout / 2;
let latency = you.latency.parse().unwrap_or_else(|e| {
error!("Unable to parse latency: {e}");
warn!("Unable to parse latency: {e}");
target_latency
});
let last_computation_time = u32::try_from(guard.as_millis()).unwrap_or(0);