Don't use a moved-from handler:

close #1560

* Obtain the executor from the handler prior
  to transferring ownership.
This commit is contained in:
Simon Ebner
2019-04-06 22:13:10 +02:00
committed by Vinnie Falco
parent ea40d0262a
commit 7e78863074
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Version 248:
* Don't use a moved-from handler
--------------------------------------------------------------------------------
Version 247:
* Fix async_base immediate completion

View File

@ -339,8 +339,9 @@ public:
this->before_invoke_hook();
if(! is_continuation)
{
auto const ex = get_executor();
net::post(net::bind_executor(
get_executor(),
ex,
beast::bind_front_handler(
std::move(h_),
std::forward<Args>(args)...)));