Commit dba99a67 authored by Dominik Charousset's avatar Dominik Charousset

Avoid unnecessary copy in monitor attachable

parent 06183076
......@@ -37,10 +37,9 @@ message make(abstract_actor* self, uint32_t reason) {
void default_attachable::actor_exited(abstract_actor* self, uint32_t reason) {
CAF_REQUIRE(self->address() != m_observer);
auto factory = m_type == monitor ? &make<down_msg> : &make<exit_msg>;
message msg = factory(self, reason);
auto ptr = actor_cast<abstract_actor_ptr>(m_observer);
ptr->enqueue(self->address(), message_id{}.with_high_priority(),
msg, self->host());
factory(self, reason), self->host());
}
bool default_attachable::matches(const token& what) {
......
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