summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-06-29 09:32:29 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-06-29 09:32:29 +0100
commitef4aca8d9ba04ba71e87d88d3befd1731f7e0294 (patch)
tree259b868581229f766989383741a5fbe6c0662081 /src
parent32331e5f2c86b0f08957a2353cf79be75d89e6ad (diff)
parentb62860a22f8dbbc04694df27803b5d9d021d2981 (diff)
downloadrabbitmq-server-ef4aca8d9ba04ba71e87d88d3befd1731f7e0294.tar.gz
merge bug24207 into default (Rabbit doesn't stop and halt correctly)
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl2
-rw-r--r--src/rabbit_limiter.erl4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 991b0b06..49b61600 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -894,7 +894,6 @@ handle_method(#'exchange.declare'{exchange = ExchangeNameBin,
nowait = NoWait},
_, State = #ch{virtual_host = VHostPath}) ->
ExchangeName = rabbit_misc:r(VHostPath, exchange, ExchangeNameBin),
- check_configure_permitted(ExchangeName, State),
check_not_default_exchange(ExchangeName),
_ = rabbit_exchange:lookup_or_die(ExchangeName),
return_ok(State, NoWait, #'exchange.declare_ok'{});
@@ -990,7 +989,6 @@ handle_method(#'queue.declare'{queue = QueueNameBin,
_, State = #ch{virtual_host = VHostPath,
conn_pid = ConnPid}) ->
QueueName = rabbit_misc:r(VHostPath, queue, QueueNameBin),
- check_configure_permitted(QueueName, State),
{{ok, MessageCount, ConsumerCount}, #amqqueue{} = Q} =
rabbit_amqqueue:with_or_die(
QueueName, fun (Q) -> {rabbit_amqqueue:stat(Q), Q} end),
diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl
index 1b72dd76..e79583fa 100644
--- a/src/rabbit_limiter.erl
+++ b/src/rabbit_limiter.erl
@@ -120,9 +120,9 @@ init([ChPid, UnackedMsgCount]) ->
prioritise_call(get_limit, _From, _State) -> 9;
prioritise_call(_Msg, _From, _State) -> 0.
-handle_call({can_send, _QPid, _AckRequired}, _From,
+handle_call({can_send, QPid, _AckRequired}, _From,
State = #lim{blocked = true}) ->
- {reply, false, State};
+ {reply, false, limit_queue(QPid, State)};
handle_call({can_send, QPid, AckRequired}, _From,
State = #lim{volume = Volume}) ->
case limit_reached(State) of