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:
parent
1d90f704b4
commit
137a511586
1 changed files with 1 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue