summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2010-03-03 13:35:58 +0000
committerMatthew Sackman <matthew@lshift.net>2010-03-03 13:35:58 +0000
commitdcdbc648acba235d9ada61518b6948bc3100d28c (patch)
tree5372dc6ebc394d3c8573140ad9923e85abdd3633
parent96ddd6baec383e6a8f97b29497e719b68f3880f9 (diff)
downloadrabbitmq-server-git-dcdbc648acba235d9ada61518b6948bc3100d28c.tar.gz
Deal with the possibility of there being no queues to go through
-rw-r--r--src/rabbit_channel.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 281cdf2712..88e20936aa 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -831,8 +831,11 @@ handle_method(#'channel.flow'{active = false}, _,
rabbit_amqqueue:invoke(QPid, Fun),
{QPid, MRef}
end || QPid <- consumer_queues(Consumers)],
- {noreply, State#ch{limiter_pid = LimiterPid1,
- blocking = dict:from_list(Queues)}};
+ case Queues =:= [] of
+ true -> {reply, #'channel.flow_ok'{active = false}, State};
+ false -> {noreply, State#ch{limiter_pid = LimiterPid1,
+ blocking = dict:from_list(Queues)}}
+ end;
handle_method(#'channel.flow_ok'{active = _}, _, State) ->
%% TODO: We may want to correlate this to channel.flow messages we