From e16972b153b75f500ace95a541652e415d0e21e3 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Thu, 10 Oct 2013 13:47:01 -0500 Subject: [PATCH] HTTP requests ending normally are no longer logged as errors. references #294 --- changelog.md | 2 ++ websocketpp/impl/connection_impl.hpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index d538bc309..708197010 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,6 @@ HEAD +- HTTP requests ending normally are no longer logged as errors. Thank you Banaan + for reporting. #294 - Eliminates spurious expired timers in certain error conditions. Thank you Banaan for reporting. #295 - Consolidates all bundled library licenses into the COPYING file. diff --git a/websocketpp/impl/connection_impl.hpp b/websocketpp/impl/connection_impl.hpp index 5468a72ab..9932ca646 100644 --- a/websocketpp/impl/connection_impl.hpp +++ b/websocketpp/impl/connection_impl.hpp @@ -1185,14 +1185,14 @@ void connection::handle_send_http_response( if (m_response.get_status_code() != http::status_code::switching_protocols) { if (m_processor) { - // if this was not a websocket connection, we have written - // the expected response and the connection can be closed. - } else { // this was a websocket connection that ended in an error std::stringstream s; s << "Handshake ended with HTTP error: " << m_response.get_status_code(); m_elog.write(log::elevel::rerror,s.str()); + } else { + // if this was not a websocket connection, we have written + // the expected response and the connection can be closed. } this->terminate(make_error_code(error::http_connection_ended)); return;