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
commita5433ec58fd8fe908a73d0aa45e6a99f56049736 (patch)
tree4e20076a7f54f0223084ba7fd5f01f0ff99380db
parent3e6eb6cfeeba79356478f151cd8f166d8523ff95 (diff)
downloadrabbitmq-server-a5433ec58fd8fe908a73d0aa45e6a99f56049736.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 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),