Skip to content

Commit

Permalink
Only log warning if it is not the first round
Browse files Browse the repository at this point in the history
  • Loading branch information
myOmikron committed Apr 27, 2023
1 parent fe18fc3 commit daf36a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/handler/games.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ pub async fn push_game_update(
let old_filename = format!("game_{game_uuid}_{old}.txt", old = game.data_id);
let old_path = StdPath::new(&settings.game_data_path).join(&old_filename);
if let Err(e) = remove_file(&old_path).await {
warn!("Outdated data in '{old_filename}' could not be removed and may leak: {e}");
if new_data_id != 1 {
warn!("Outdated data in '{old_filename}' could not be removed and may leak: {e}");
}
}

// Notify all remaining players about the new game data
Expand Down

0 comments on commit daf36a0

Please sign in to comment.