diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-08-05 17:43:31 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-08-05 17:43:31 +0100 |
commit | 083464c6bd782bc2882bc366cfeeb24d6ac59be3 (patch) | |
tree | b1bc3affb214b95e5467d5de4db944150c35b67a | |
parent | b73d562111cd764097cde55ff761e3c2a2d82ec0 (diff) | |
download | rabbitmq-server-083464c6bd782bc2882bc366cfeeb24d6ac59be3.tar.gz |
Be more assertive about exclusive consumer being... exclusive.
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index e1fa7006..e67787aa 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1098,11 +1098,10 @@ handle_cast({set_maximum_since_use, Age}, State) -> handle_cast(force_event_refresh, State = #q{exclusive_consumer = Exclusive}) -> rabbit_event:notify(queue_exists, infos(?CREATION_EVENT_KEYS, State)), case Exclusive of - none -> [emit_consumer_exists(Ch, CTag, false, AckRequired) || - {Ch, CTag, AckRequired} <- consumers(State)]; - _ -> [emit_consumer_exists(Ch, CTag, true, AckRequired) || - {Ch, CTag, AckRequired} <- consumers(State), - Exclusive = {Ch, CTag}] + none -> [emit_consumer_exists(Ch, CTag, false, AckRequired) || + {Ch, CTag, AckRequired} <- consumers(State)]; + {Ch, CTag} -> [{Ch, CTag, AckRequired}] = consumers(State), + emit_consumer_exists(Ch, CTag, true, AckRequired) end, noreply(State). |