Commit 11852b66 authored by Dominik Charousset's avatar Dominik Charousset

mark replied message to avoid unnecessary empty reply messages

parent aa9f724f
......@@ -107,16 +107,21 @@ void local_actor::reply_message(any_tuple&& what) {
if (whom == nullptr) {
return;
}
auto id = m_current_node->mid;
auto& id = m_current_node->mid;
if (id.valid() == false || id.is_response()) {
send_message(whom.get(), std::move(what));
}
else if (chaining_enabled()) {
if (whom->chained_sync_enqueue(this, id.response_id(), std::move(what))) {
m_chained_actor = whom;
else {
if (chaining_enabled()) {
if (whom->chained_sync_enqueue(this, id.response_id(), std::move(what))) {
m_chained_actor = whom;
}
}
else {
whom->sync_enqueue(this, id.response_id(), std::move(what));
}
id.mark_as_answered();
}
else whom->sync_enqueue(this, id.response_id(), std::move(what));
}
void local_actor::forward_message(const actor_ptr& new_receiver) {
......
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