diff --git a/client/clientConnection.cpp b/client/clientConnection.cpp index a7f7e5c2..d286b919 100644 --- a/client/clientConnection.cpp +++ b/client/clientConnection.cpp @@ -87,9 +87,9 @@ void ClientConnection::stop() if (socket_) { socket_->shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec); - if (ec) logE << "Error in socket shutdown: " << ec << endl; + if (ec) logE << "Error in socket shutdown: " << ec.message() << endl; socket_->close(ec); - if (ec) logE << "Error in socket close: " << ec << endl; + if (ec) logE << "Error in socket close: " << ec.message() << endl; } if (readerThread_) { diff --git a/server/serverSession.cpp b/server/serverSession.cpp index 68c5e745..79d3bedd 100644 --- a/server/serverSession.cpp +++ b/server/serverSession.cpp @@ -58,9 +58,9 @@ void ServerSession::stop() if (socket_) { socket_->shutdown(boost::asio::ip::tcp::socket::shutdown_both, ec); - if (ec) logE << "Error in socket shutdown: " << ec << "\n"; + if (ec) logE << "Error in socket shutdown: " << ec.message() << "\n"; socket_->close(ec); - if (ec) logE << "Error in socket close: " << ec << "\n"; + if (ec) logE << "Error in socket close: " << ec.message() << "\n"; } if (readerThread_) {