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 | bde44f20e8bb44411eec6a1dcdfb20f4fb290aa4 (patch) | |
| tree | 4e20076a7f54f0223084ba7fd5f01f0ff99380db | |
| parent | b928b4570ee97ebfd60df6cbfbffd91c406ffb5f (diff) | |
| download | rabbitmq-server-git-bde44f20e8bb44411eec6a1dcdfb20f4fb290aa4.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 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), |
