Skip to content

Commit e16972b

Browse files
committed
HTTP requests ending normally are no longer logged as errors. references #294
1 parent 3d0d28a commit e16972b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
HEAD
2+
- HTTP requests ending normally are no longer logged as errors. Thank you Banaan
3+
for reporting. #294
24
- Eliminates spurious expired timers in certain error conditions. Thank you
35
Banaan for reporting. #295
46
- Consolidates all bundled library licenses into the COPYING file.

websocketpp/impl/connection_impl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,14 +1185,14 @@ void connection<config>::handle_send_http_response(
11851185
if (m_response.get_status_code() != http::status_code::switching_protocols)
11861186
{
11871187
if (m_processor) {
1188-
// if this was not a websocket connection, we have written
1189-
// the expected response and the connection can be closed.
1190-
} else {
11911188
// this was a websocket connection that ended in an error
11921189
std::stringstream s;
11931190
s << "Handshake ended with HTTP error: "
11941191
<< m_response.get_status_code();
11951192
m_elog.write(log::elevel::rerror,s.str());
1193+
} else {
1194+
// if this was not a websocket connection, we have written
1195+
// the expected response and the connection can be closed.
11961196
}
11971197
this->terminate(make_error_code(error::http_connection_ended));
11981198
return;

0 commit comments

Comments
 (0)