fixed issue with erronious request input from clients
This commit is contained in:
parent
010eabf6e3
commit
228de2ced8
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue