Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO: custom service which works with spawn/yield
From: Cristian Morales Vega (cristian_at_[hidden])
Date: 2018-07-25 16:30:10


On 25 July 2018 at 17:13, Vinnie Falco via Boost-users
<boost-users_at_[hidden]> wrote:
> On Wed, Jul 25, 2018 at 7:25 AM, Cristian Morales Vega via Boost-users
> <boost-users_at_[hidden]> wrote:
>> boost::system::error_code ec = boost::asio::error::already_started;
>> boost::asio::post(
>> boost::beast::bind_handler(std::move(init.completion_handler),
>> std::move(ec)));
>
> Two things you can try:
>
> 1. Don't use move on ec:
>
> boost::system::error_code ec = boost::asio::error::already_started;
> boost::asio::post(boost::beast::bind_handler(
> std::move(init.completion_handler), ec);
>
> 2. Try the tip of the Beast master branch (or the 1.68 beta). In
> particular, this change:
>
> <https://github.com/boostorg/beast/commit/f948c9cbe57552f2a2b1306235ba578584b1d2c0>

Unfortunately it makes no difference. Actually even using
"std::bind(std::move(init.completion_handler), ec);" I still get
"system:0".


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net