Permalink
Browse files

fix bug in synchronous response handling

this patch fixed a bug that allowed 'EXITED' messages to pass
synchronous response messages
  • Loading branch information...
Neverlord committed Feb 12, 2013
1 parent b8b594c commit 60c9de1568588138cdd407691126da7e79dbe601
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/default_actor_proxy.cpp
@@ -94,8 +94,12 @@ void default_actor_proxy::forward_msg(const actor_ptr& sender,
switch (m_pending_requests.enqueue(new_req_info(sender, mid))) {
case intrusive::queue_closed: {
if (sender) {
- detail::sync_request_bouncer f{this, exit_reason()};
- f(sender.get(), mid);
+ intrusive_ptr<default_actor_proxy> _this{this};
+ auto rsn = exit_reason();
+ m_proto->run_later([_this,rsn,sender,mid] {
+ detail::sync_request_bouncer f{_this.get(), rsn};
+ f(sender.get(), mid);
+ });
}
return; // no need to forward message
}

0 comments on commit 60c9de1

Please sign in to comment.