Skip to content

Commit

Permalink
Merge bug26389
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon MacMullen committed Sep 25, 2014
2 parents 8e42090 + 66d7135 commit d0ec465
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rabbit_queue_consumers.erl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ unacknowledged_message_count() ->
lists:sum([queue:len(C#cr.acktags) || C <- all_ch_record()]).

add(ChPid, CTag, NoAck, LimiterPid, LimiterActive, Prefetch, Args, IsEmpty,
State = #state{consumers = Consumers}) ->
State = #state{consumers = Consumers,
use = CUInfo}) ->
C = #cr{consumer_count = Count,
limiter = Limiter} = ch_record(ChPid, LimiterPid),
Limiter1 = case LimiterActive of
Expand All @@ -144,7 +145,8 @@ add(ChPid, CTag, NoAck, LimiterPid, LimiterActive, Prefetch, Args, IsEmpty,
ack_required = not NoAck,
prefetch = Prefetch,
args = Args},
State#state{consumers = add_consumer({ChPid, Consumer}, Consumers)}.
State#state{consumers = add_consumer({ChPid, Consumer}, Consumers),
use = update_use(CUInfo, active)}.

remove(ChPid, CTag, State = #state{consumers = Consumers}) ->
case lookup_ch(ChPid) of
Expand Down

0 comments on commit d0ec465

Please sign in to comment.