Commit 57117e3c authored by Dominik Charousset's avatar Dominik Charousset

Ensure proxy instances live as long as remote side

parent e211c2aa
...@@ -497,7 +497,10 @@ actor_proxy_ptr basp_broker::make_proxy(const id_type& nid, actor_id aid) { ...@@ -497,7 +497,10 @@ actor_proxy_ptr basp_broker::make_proxy(const id_type& nid, actor_id aid) {
auto res = make_counted<remote_actor_proxy>(aid, nid, self); auto res = make_counted<remote_actor_proxy>(aid, nid, self);
res->attach_functor([=](uint32_t) { res->attach_functor([=](uint32_t) {
mm->run_later([=] { mm->run_later([=] {
erase_proxy(nid, aid); // using res->id() instead of aid keeps this actor instance alive
// until the original instance terminates, thus preventing subtle
// bugs with attachables
erase_proxy(nid, res->id());
}); });
}); });
// tell remote side we are monitoring this actor now // tell remote side we are monitoring this actor now
......
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