Skip to content

Commit

Permalink
Fix issue #1757: prevent abnormal termination if failed to bind address
Browse files Browse the repository at this point in the history
(cherry-picked from commit 19d9e15)
  • Loading branch information
loonycyborg committed Oct 7, 2018
1 parent 368e5cb commit 99da342
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/server/server.cpp
Expand Up @@ -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;
}

0 comments on commit 99da342

Please sign in to comment.