fixed issue with erronious request input from clients

This commit is contained in:
michael-bailey 2024-05-11 16:53:07 +01:00
parent 010eabf6e3
commit 228de2ced8
1 changed files with 6 additions and 1 deletions

View File

@ -96,7 +96,12 @@ impl Server {
mut conn: Box<dyn NetworkConnection>,
) {
println!("[Server] Getting request");
let req = conn.get_request().await.unwrap();
let req = conn.get_request().await;
let Ok(req) = req else {
println!("[Server] Got invalid request");
return;
};
match req {
ServerRequest::GetInfo => {