Commit 207460b8 authored by Matthias Vallentin's avatar Matthias Vallentin

Remove monitoring when workers leave a pool

parent 260d50c8
......@@ -183,6 +183,9 @@ bool actor_pool::filter(upgrade_lock<detail::shared_spinlock>& guard,
auto last = workers_.end();
auto i = std::find(workers_.begin(), last, what);
if (i != last) {
default_attachable::observe_token tk{address(),
default_attachable::monitor};
what->detach(tk);
workers_.erase(i);
}
return true;
......
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