Skip to content

Commit 2f312d8

Browse files
michaelklishinmergify[bot]
authored andcommitted
is_recoverable/1: improve guards
(cherry picked from commit 8dfcc9c)
1 parent 41ce0f9 commit 2f312d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

deps/rabbit/src/rabbit_classic_queue.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ delete(Q, IfUnused, IfEmpty, ActingUser) when ?amqqueue_is_classic(Q) ->
121121
{ok, 0}
122122
end.
123123

124-
is_recoverable(Q) when ?is_amqqueue(Q) ->
124+
is_recoverable(Q) when ?is_amqqueue(Q) and ?amqqueue_is_classic(Q) ->
125125
Node = node(),
126126
Node =:= amqqueue:qnode(Q) andalso
127127
%% Terminations on node down will not remove the rabbit_queue

deps/rabbit/src/rabbit_quorum_queue.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ reductions(Name) ->
554554
0
555555
end.
556556

557-
is_recoverable(Q) ->
557+
is_recoverable(Q) when ?is_amqqueue(Q) and ?amqqueue_is_quorum(Q) ->
558558
Node = node(),
559559
Nodes = get_nodes(Q),
560560
lists:member(Node, Nodes).

0 commit comments

Comments
 (0)