diff --git a/CHANGELOG.md b/CHANGELOG.md index 05e4d1bd..6bce73ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 194: + +* http::async_read returns the right byte count on error + +-------------------------------------------------------------------------------- + Version 193: * Update ssl_stream signatures for networking changes diff --git a/include/boost/beast/http/impl/read.ipp b/include/boost/beast/http/impl/read.ipp index ce99e104..aeccced0 100644 --- a/include/boost/beast/http/impl/read.ipp +++ b/include/boost/beast/http/impl/read.ipp @@ -313,9 +313,9 @@ operator()( BOOST_ASIO_CORO_YIELD async_read_some( s_, b_, p_, std::move(*this)); + bytes_transferred_ += bytes_transferred; if(ec) goto upcall; - bytes_transferred_ += bytes_transferred; if(Condition{}(p_)) goto upcall; }