Wesnothd Connection: catch all exceptions thrown in the worker thread

This ensures a stray uncaught exception doesn't crash the game, since if an std::thread exists due to an exception, std::terminate is called.
This commit is contained in:
Charles Dang 2021-02-11 12:44:56 +11:00
parent 1d90f704b4
commit 137a511586

View file

@ -94,6 +94,7 @@ wesnothd_connection::wesnothd_connection(const std::string& host, const std::str
} catch(const std::future_error&) {
// Handshake already complete. Do nothing.
}
} catch(...) {
}
LOG_NW << "wesnothd_connection::io_service::run() returned\n";