Fix issue #1757: prevent abnormal termination if failed to bind address
This commit is contained in:
parent
cfd5d5289d
commit
19d9e150e1
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue