summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2013-02-11 18:38:49 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2013-02-11 18:38:49 +0000
commitbde44f20e8bb44411eec6a1dcdfb20f4fb290aa4 (patch)
tree4e20076a7f54f0223084ba7fd5f01f0ff99380db
parentb928b4570ee97ebfd60df6cbfbffd91c406ffb5f (diff)
downloadrabbitmq-server-git-bde44f20e8bb44411eec6a1dcdfb20f4fb290aa4.tar.gz
minor optimisation
-rw-r--r--src/rabbit_amqqueue_process.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 0594e25034..88d1329057 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),