Skip to content

Commit 6b73cad

Browse files
authored
Merge pull request #1685 from rabbitmq/rabbitmq-server-1682
Take "true" case into consideration
2 parents bc662bc + 0be4ac3 commit 6b73cad

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/rabbit_amqqueue.erl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,17 @@ retry_wait(Q = #amqqueue{pid = QPid, name = Name, state = QState}, F, E, Retries
584584
{stopped, false} ->
585585
E({absent, Q, stopped});
586586
_ ->
587-
false = rabbit_mnesia:is_process_alive(QPid),
587+
case rabbit_mnesia:is_process_alive(QPid) of
588+
true ->
589+
% rabbitmq-server#1682
590+
% The old check would have crashed here,
591+
% instead, log it and run the exit fun. absent & alive is weird,
592+
% but better than crashing with badmatch,true
593+
rabbit_log:debug("Unexpected alive queue process ~p~n", [QPid]),
594+
E({absent, Q, alive});
595+
false ->
596+
ok % Expected result
597+
end,
588598
timer:sleep(30),
589599
with(Name, F, E, RetriesLeft - 1)
590600
end.

0 commit comments

Comments
 (0)