added resign event and deleting finished matches
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::connection::ServerMessage2;
|
||||
use crate::connection::{ConnectionMap, GameMatch, MatchMap, WaitingQueue, broadcast_to_match};
|
||||
use crate::connection::{ConnectionMap, GameMatch, MatchMap, WaitingQueue};
|
||||
use rand::random;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -25,6 +25,10 @@ impl MatchmakingSystem {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn clean_up(&self, match_id: Uuid) {
|
||||
self.matches.lock().await.remove(&match_id);
|
||||
}
|
||||
|
||||
async fn try_create_match(&self) {
|
||||
let mut queue = self.waiting_queue.lock().await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user