summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_quorum_queue.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl
index 3d0d074e02..7e9974b27a 100644
--- a/src/rabbit_quorum_queue.erl
+++ b/src/rabbit_quorum_queue.erl
@@ -973,8 +973,12 @@ transfer_leadership(Q, Destination) ->
{RaName, _} = Pid = amqqueue:get_pid(Q),
case ra:transfer_leadership(Pid, {RaName, Destination}) of
ok ->
- {_, _, {_, NewNode}} = ra:members(Pid),
- {migrated, NewNode};
+ case ra:members(Pid) of
+ {_, _, {_, NewNode}} ->
+ {migrated, NewNode};
+ {timeout, _} ->
+ {not_migrated, ra_members_timeout}
+ end;
already_leader ->
{not_migrated, already_leader};
{error, Reason} ->