Commit a306fff8 authored by Dominik Charousset's avatar Dominik Charousset

fixed use-after-move issue

parent 19e34924
......@@ -240,7 +240,7 @@ class invoke_policy {
[=](any_tuple& intermediate) -> optional<any_tuple> {
if (!intermediate.empty()) {
// do no use lamba expresion type to
// avoid recursive template intantiaton
// avoid recursive template instantiaton
behavior::continuation_fun f2 = [=](any_tuple& m) -> optional<any_tuple> {
return std::move(m);
};
......@@ -265,7 +265,11 @@ class invoke_policy {
// respond by using the result of 'fun'
CPPA_LOG_DEBUG("respond via response_promise");
auto fhdl = fetch_response_promise(self, hdl);
if (fhdl) fhdl.deliver(std::move(*res));
if (fhdl) {
fhdl.deliver(std::move(*res));
// inform caller about success
return any_tuple{};
}
}
}
return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment