diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2013-02-11 18:38:49 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-02-11 18:38:49 +0000 |
commit | a5433ec58fd8fe908a73d0aa45e6a99f56049736 (patch) | |
tree | 4e20076a7f54f0223084ba7fd5f01f0ff99380db | |
parent | 3e6eb6cfeeba79356478f151cd8f166d8523ff95 (diff) | |
download | rabbitmq-server-a5433ec58fd8fe908a73d0aa45e6a99f56049736.tar.gz |
minor optimisation
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 0594e250..88d13290 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -621,11 +621,12 @@ possibly_unblock(State, ChPid, Update) -> not_found -> State; C -> - C1 = #cr{blocked_ctags = BCTags1} = Update(C), + C1 = #cr{blocked_ctags = BCTags} = Update(C), + IsBlocked = is_ch_blocked(C1), {Blocked, Unblocked} = lists:partition( fun({_ChPid, #consumer{tag = CTag}}) -> - is_ch_blocked(C1) orelse lists:member(CTag, BCTags1) + IsBlocked orelse lists:member(CTag, BCTags) end, queue:to_list(C1#cr.blocked_consumers)), case Unblocked of [] -> update_ch_record(C1), |