diff --git a/CHANGELOG.md b/CHANGELOG.md index 427c106a..eba7dd4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 140: * Fix some integer warnings in 64-bit builds * Fix utf8_checker test failures +* Fix signature for async_read_some, and tests -------------------------------------------------------------------------------- diff --git a/include/boost/beast/http/impl/read.ipp b/include/boost/beast/http/impl/read.ipp index 6d80ead0..5ecfae7d 100644 --- a/include/boost/beast/http/impl/read.ipp +++ b/include/boost/beast/http/impl/read.ipp @@ -536,7 +536,8 @@ async_read_some( boost::asio::is_dynamic_buffer::value, "DynamicBuffer requirements not met"); BOOST_ASSERT(! parser.is_done()); - boost::asio::async_completion init{handler}; + boost::asio::async_completion init{handler}; detail::read_some_op{ diff --git a/test/beast/http/read.cpp b/test/beast/http/read.cpp index 55837762..e2aea0bd 100644 --- a/test/beast/http/read.cpp +++ b/test/beast/http/read.cpp @@ -311,6 +311,25 @@ public: break; } BEAST_EXPECT(n < limit); + + for(n = 0; n < limit; ++n) + { + test::fail_counter fc{n}; + test::stream c{ioc_, fc, + "GET / HTTP/1.1\r\n" + "Host: localhost\r\n" + "User-Agent: test\r\n" + "Content-Length: 0\r\n" + "\r\n" + }; + request_parser m; + error_code ec = test::error::fail_error; + multi_buffer b; + async_read_some(c, b, m, do_yield[ec]); + if(! ec) + break; + } + BEAST_EXPECT(n < limit); } void