Skip to content

Commit 94dadcb

Browse files
committed
Merge pull request #1685 from rabbitmq/rabbitmq-server-1682
Take "true" case into consideration (cherry picked from commit 6b73cad)
1 parent 795141a commit 94dadcb

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
@@ -504,7 +504,17 @@ retry_wait(Q = #amqqueue{pid = QPid, name = Name, state = QState}, F, E, Retries
504504
{stopped, false} ->
505505
E({absent, Q, stopped});
506506
_ ->
507-
false = rabbit_mnesia:is_process_alive(QPid),
507+
case rabbit_mnesia:is_process_alive(QPid) of
508+
true ->
509+
% rabbitmq-server#1682
510+
% The old check would have crashed here,
511+
% instead, log it and run the exit fun. absent & alive is weird,
512+
% but better than crashing with badmatch,true
513+
rabbit_log:debug("Unexpected alive queue process ~p~n", [QPid]),
514+
E({absent, Q, alive});
515+
false ->
516+
ok % Expected result
517+
end,
508518
timer:sleep(30),
509519
with(Name, F, E, RetriesLeft - 1)
510520
end.

0 commit comments

Comments
 (0)