Permalink
Browse files

fixed bug regarding synchronous & asynchronous timeouts (Issue 42)

  • Loading branch information...
1 parent d33d5b2 commit 84bb540b1b63317b05de0594b19260a3d5cf106d @Neverlord Neverlord committed Jul 27, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 cppa/detail/receive_policy.hpp
@@ -341,7 +341,9 @@ class receive_policy {
handle_timeout(client, fun);
if (awaited_response.valid()) {
client->mark_arrived(awaited_response);
+ client->remove_handler(awaited_response);
}
+ hm_cleanup(client, policy);
return hm_msg_handled;
}
case sync_response: {
@@ -355,9 +357,9 @@ class receive_policy {
# else
fun(node->msg);
# endif
- hm_cleanup(client, policy);
client->mark_arrived(awaited_response);
client->remove_handler(awaited_response);
+ hm_cleanup(client, policy);
return hm_msg_handled;
}
return hm_cache_msg;

0 comments on commit 84bb540

Please sign in to comment.