id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9723,async_read_until logic bug,anonymous,chris_kohlhoff,"Hi, Documentation of async_read_until says: ""If the streambuf's get area already contains the delimiter, this asynchronous operation completes immediately"" However, I noticed that it was not happening and the asynchronous operation was never completing if more data was not received. A logic bug was found in the file ''boost/asio/impl/read_until.hpp'' (read_until_delim_op): {{{ 412 // Check if we're done. 413 if (!start && bytes_to_read == 0) 414 break; }}} ""start"" is true if it is the first operation in the async_read_until composed operation (read_until_delim_op): no async_read_some inside read_until_delim_op has been required yet. Therefore, the ""break"" instruction is never reached without first calling at least once async_read_some inside read_until_delim_op. Thus, '''the asynchronous operation will never complete immediately''' even if the delimiter is already contained in the streambuf's get area. The provided patch fixes the issue. Thanks for amazing asio work, hope this could help.",Bugs,closed,To Be Determined,asio,Boost 1.55.0,Showstopper,invalid,async_read_until,