Ticket #5999 (closed Bugs: fixed)
boost::asio::async_read with completion_condition strange behavior when the given buffer is exausted before the completion function returned true
|Reported by:||bugspynet@…||Owned by:||chris_kohlhoff|
|Milestone:||To Be Determined||Component:||asio|
asio::async_read(tcpSocket, inBuf,completionFn, handlerFn);
Where inBuf was set to a max size N.
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)
Call the completionFn or handlerFn with error_code set.
handlerFn is called without setting the error_code.