summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-03-14 16:56:52 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-03-14 16:56:52 +0000
commite4edc17159a885dc118938ccff3ffe5da93160d6 (patch)
tree8e72efc3276ba51477b5fb72b3609cd25a6b48a1
parent80854415c2e1579d52127b9722c985c77d0791e4 (diff)
downloadrabbitmq-server-e4edc17159a885dc118938ccff3ffe5da93160d6.tar.gz
Whoops - add missing catch case which I just hit in testing...
-rw-r--r--src/gm.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gm.erl b/src/gm.erl
index fd8d9b77..8cf22581 100644
--- a/src/gm.erl
+++ b/src/gm.erl
@@ -931,6 +931,12 @@ join_group(Self, GroupName, #gm_group { members = Members } = Group) ->
prune_or_create_group(Self, GroupName));
Alive ->
Left = lists:nth(random:uniform(length(Alive)), Alive),
+ Handler =
+ fun () ->
+ join_group(
+ Self, GroupName,
+ record_dead_member_in_group(Left, GroupName))
+ end,
try
case gen_server2:call(
Left, {add_on_right, Self}, infinity) of
@@ -940,9 +946,10 @@ join_group(Self, GroupName, #gm_group { members = Members } = Group) ->
catch
exit:{R, _}
when R =:= noproc; R =:= normal; R =:= shutdown ->
- join_group(
- Self, GroupName,
- record_dead_member_in_group(Left, GroupName))
+ Handler();
+ exit:{{R, _}, _}
+ when R =:= nodedown; R =:= shutdown ->
+ Handler()
end
end
end.