Fix completion handler invocation signatures

Completion handlers should be called with the exact same signature as
provided to `async_result`.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
Damian Jarek authored and Vinnie Falco committed 2019-03-07 12:56:40 -08:00
1 parent fdf64a4550
commit b9aad3d06c
7 files changed
+38 -18

No files matched your search

+5 -2
View File
@@ -161,8 +161,11 @@ operator()(
net::mutable_buffer b;
auto sp = wp_.lock();
if(! sp)
return this->complete(cont,
net::error::operation_aborted, 0);
{
ec = net::error::operation_aborted;
bytes_transferred_ = 0;
return this->complete(cont, ec, bytes_transferred_);
}
auto& impl = *sp;
BOOST_ASIO_CORO_REENTER(*this)
{