Commit 84bb540b authored by neverlord's avatar neverlord

fixed bug regarding synchronous & asynchronous timeouts (Issue 42)

parent d33d5b2c
......@@ -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;
......
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