diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-12 05:23:40 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-12 05:23:40 +0100 |
commit | f1282da0f8e33c7e9305b67cdcf2e9ba03d5c2e3 (patch) | |
tree | 7b7a4b0d329c52797f59da0743ecfaefc6681e58 | |
parent | b65494db2ac7e5127d0c5ab861525a556ac02e4a (diff) | |
download | rabbitmq-server-f1282da0f8e33c7e9305b67cdcf2e9ba03d5c2e3.tar.gz |
we must always clear both the 'EXIT' and 'DOWN' message
-rw-r--r-- | src/supervisor2.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index 75c4bc11..edd43ec0 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 |