Skip to content

Commit c806b07

Browse files
committed
Emit inactive when no consumer can be activated
1 parent ec7f018 commit c806b07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/rabbit_fifo.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ activate_next_consumer(#?MODULE{consumers = Cons,
839839
single_active, Effects0),
840840
{State, Effects};
841841
[] ->
842-
{State0, Effects0}
842+
{State0, [{aux, inactive} | Effects0]}
843843
end;
844844
_ ->
845845
{State0, Effects0}

test/rabbit_fifo_SUITE.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ active_flag_not_updated_when_consumer_suspected_unsuspected_and_single_active_co
10251025

10261026
{State2, _, Effects2} = apply(#{}, {down, Pid1, noconnection}, State1),
10271027
% one monitor and one consumer status update (deactivated)
1028-
?assertEqual(2, length(Effects2)),
1028+
?assertEqual(3, length(Effects2)),
10291029

10301030
{_, _, Effects3} = apply(#{index => 1}, {nodeup, node(self())}, State2),
10311031
% for each consumer: 1 effect to monitor the consumer PID

0 commit comments

Comments
 (0)