can now go back to the main menu before starting a match

This commit is contained in:
2025-11-29 20:21:52 +01:00
parent bc03cead82
commit d94c088ae9
2 changed files with 21 additions and 10 deletions

View File

@@ -72,6 +72,7 @@ enum ClientEvent {
Resign,
Chat { text: String },
RequestLegalMoves { fen: String },
CloseConnection,
}
#[derive(Debug)]
@@ -329,7 +330,7 @@ pub async fn handle_connection(
}
};
broadcast_to_match(
let _ = broadcast_to_match(
&connections,
&matches,
connections
@@ -342,7 +343,11 @@ pub async fn handle_connection(
&serde_json::to_string(&fuck).unwrap(),
)
.await;
clean_up_match(&matches, fuck_id);
clean_up_match(&matches, fuck_id).await;
}
CloseConnection => {
warn!("Closing connection for: {}", &player_id);
break;
}
_ => {
warn!("Not known client event");