From 9b152d8098c00705461a31a8c9fc09602ccc03cb Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 20 Mar 2014 10:43:01 -0700 Subject: [PATCH] Fix error code assignment in raw_parser --- src/beast/beast/http/impl/raw_parser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/beast/beast/http/impl/raw_parser.cpp b/src/beast/beast/http/impl/raw_parser.cpp index b87fd520c..cecf1d84b 100644 --- a/src/beast/beast/http/impl/raw_parser.cpp +++ b/src/beast/beast/http/impl/raw_parser.cpp @@ -129,8 +129,7 @@ raw_parser::do_headers_done () { auto const p (reinterpret_cast (&m_state)); bool const keep_alive (joyent::http_should_keep_alive (p) != 0); - error_code const ec ( - m_cb.get().on_headers_done (keep_alive)); + m_ec = m_cb.get().on_headers_done (keep_alive); return m_ec ? 1 : 0; } @@ -149,7 +148,7 @@ raw_parser::do_message_complete () { auto const p (reinterpret_cast (&m_state)); bool const keep_alive (joyent::http_should_keep_alive (p) != 0); - error_code const ec (m_cb.get().on_message_complete (keep_alive)); + m_ec = m_cb.get().on_message_complete (keep_alive); return m_ec ? 1 : 0; }