diff --git a/src/wesnothd_connection.cpp b/src/wesnothd_connection.cpp index 995edcb321dd..61e1db88ea6e 100644 --- a/src/wesnothd_connection.cpp +++ b/src/wesnothd_connection.cpp @@ -165,6 +165,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); }