Boost C++ Libraries: Ticket #5999: boost::asio::async_read with completion_condition strange behavior when the given buffer is exausted before the completion function returned true https://svn.boost.org/trac10/ticket/5999 <p> Consider </p> <pre class="wiki">asio::async_read(tcpSocket, inBuf,completionFn, handlerFn); </pre><p> <strong>Where inBuf was set to a max size N</strong>. <br /><br /> Now if the completionFn won't return true for the next N bytes received, asio strangely just calls handlerFn without the error_code set. There is no way for the code to know that something went wrong (the buffer exausted before completionFn returned true)<br /> </p> <p> <strong>Expected behavior:</strong><br /> </p> <p> Call the completionFn or handlerFn with error_code set. </p> <p> <strong>Actual behavior:</strong> </p> <p> handlerFn is called without setting the error_code. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5999 Trac 1.4.3 chris_kohlhoff Sat, 15 Oct 2011 23:46:51 GMT <link>https://svn.boost.org/trac10/ticket/5999#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5999#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/74952" title="Clarify that the read operation ends when the buffer is full. Refs #5999 ">[74952]</a>) Clarify that the read operation ends when the buffer is full. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5999" title="#5999: Bugs: boost::asio::async_read with completion_condition strange behavior ... (closed: fixed)">#5999</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Mon, 17 Oct 2011 11:32:31 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5999#comment:2 https://svn.boost.org/trac10/ticket/5999#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/75009" title="Merge from trunk: * Make number of strand implementations ...">[75009]</a>) Merge from trunk: </p> <ul><li>Make number of strand implementations configurable by defining BOOST_ASIO_STRAND_IMPLEMENTATIONS to the number. </li></ul><ul><li>Programs can now define BOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION to switch the allocation of strand implementations to use a round-robin approach rather than hashing. </li></ul><ul><li>Fix potential strand starvation issue that can occur when strand.post() is used. </li></ul><ul><li>Update descriptor state allocation in kqueue_reactor to match approach used in epoll_reactor. </li></ul><ul><li>Construct epoll_reactor's interrupter member first to fix exception safety issue. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6006" title="#6006: Bugs: Potential epoll fd leak in boost::asio::detail::epoll_reactor (closed: fixed)">#6006</a> </li></ul><ul><li>Clarify that the read operation ends when the buffer is full. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5999" title="#5999: Bugs: boost::asio::async_read with completion_condition strange behavior ... (closed: fixed)">#5999</a> </li></ul> Ticket