summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-08-12 05:23:40 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-08-12 05:23:40 +0100
commitf937755fe73ec9600e4849666de8e68e3e1616b7 (patch)
tree7b7a4b0d329c52797f59da0743ecfaefc6681e58 /src
parent9d0230adde9f53afc7e7b35d24db257bb703fb95 (diff)
downloadrabbitmq-server-git-f937755fe73ec9600e4849666de8e68e3e1616b7.tar.gz
we must always clear both the 'EXIT' and 'DOWN' message
Diffstat (limited to 'src')
-rw-r--r--src/supervisor2.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index 75c4bc1119..edd43ec002 100644
--- a/src/supervisor2.erl
+++ b/src/supervisor2.erl
@@ -715,13 +715,13 @@ monitor_child(Pid) ->
receive
%% If the child dies before the unlik we must empty
%% the mail-box of the 'EXIT'-message and the 'DOWN'-message.
- {'EXIT', Pid, Reason} ->
- case Reason of
- normal -> ok;
- _ -> receive
- {'DOWN', _, process, Pid, _} ->
- {error, Reason}
- end
+ {'EXIT', Pid, Reason} ->
+ receive
+ {'DOWN', _, process, Pid, _} ->
+ case Reason of
+ normal -> ok;
+ _ -> {error, Reason}
+ end
end
after 0 ->
%% If a naughty child did unlink and the child dies before