Skip to content

Commit

Permalink
Prevent hang in case of connecting to old server not supporting new h…
Browse files Browse the repository at this point in the history
…andshake value
  • Loading branch information
loonycyborg committed Feb 22, 2021
1 parent e27c644 commit cdc11d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wesnothd_connection.cpp
Expand Up @@ -164,6 +164,9 @@ void wesnothd_connection::handle_handshake(const error_code& ec)
{
MPTEST_LOG;
if(ec) {
if(ec == boost::asio::error::eof) {
throw std::runtime_error("Failed to complete handshake with server");
}
LOG_NW << __func__ << " Throwing: " << ec << "\n";
throw system_error(ec);
}
Expand Down

0 comments on commit cdc11d8

Please sign in to comment.