diff --git a/.gitignore b/.gitignore index cbc2e3b90d..cacd0f7a80 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ book/dist .vscode trace-*.json perf.data* -callgrind.out* \ No newline at end of file +callgrind.out* +.cargo diff --git a/src/ui/main_menu/network_game.rs b/src/ui/main_menu/network_game.rs index 2ef764c014..71cf3c3472 100644 --- a/src/ui/main_menu/network_game.rs +++ b/src/ui/main_menu/network_game.rs @@ -609,7 +609,7 @@ impl<'w, 's> WidgetSystem for MatchmakingMenu<'w, 's> { *matchmaking_server = params .storage .get::(Settings::STORAGE_KEY) - .unwrap() + .unwrap_or_else(|| params.game.default_settings.clone()) .matchmaking_server; } @@ -734,9 +734,10 @@ impl<'w, 's> WidgetSystem for MatchmakingMenu<'w, 's> { match status { Status::Idle => (), Status::Searching => { - ONLINE_MATCHMAKER - .try_send(networking::OnlineMatchmakerRequest::StopSearch) - .unwrap(); + if let Err(err) = ONLINE_MATCHMAKER.try_send(networking::OnlineMatchmakerRequest::StopSearch){ + error!("Error stopping search: {:?}", err); + } + *status = Status::Idle; } Status::Joining => {