ignore network errors in linger mode

(fixes bug #10077: After observing game in multiplayer got back to
main screen, not to lobby.)
This commit is contained in:
Gunter Labes 2008-01-12 11:23:31 +00:00
parent ba66a78d82
commit e9514a9467
2 changed files with 4 additions and 0 deletions

View file

@ -403,6 +403,7 @@ void wait::process_network_data(const config& data, const network::connection so
return;
} else if(data.child("scenario_diff")) {
LOG_NW << "received diff for scenario... applying...\n";
//! @todo We should catch config::error and then leave the game.
level_.apply_diff(*data.child("scenario_diff"));
generate_menu();
} else if(data.child("side")) {

View file

@ -285,6 +285,9 @@ void playmp_controller::linger(upload_log& log, LEVEL_RESULT result)
//Catch this error here so mp players quitting unexpectedly are not thrown back
//to the title screen
result = e.result;
// Thrown when receiving [leave_game].
} catch(network::error& e) {
result = QUIT;
}
// revert the end-turn button text to its normal label