mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 23:49:17 +00:00
Fix issue #1757: prevent abnormal termination if failed to bind address
(cherry-picked from commit 19d9e150e15ef811a2a395dbce874086c5efe216)
This commit is contained in:
parent
368e5cb7a7
commit
99da3421ab
@ -2836,7 +2836,12 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
wesnothd::server(port, keep_alive, config_file, min_threads, max_threads).run();
|
||||
try {
|
||||
wesnothd::server(port, keep_alive, config_file, min_threads, max_threads).run();
|
||||
} catch(std::exception& e) {
|
||||
ERR_SERVER << "terminated by C++ exception: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user