diff options
| author | Matthew Sackman <matthew@lshift.net> | 2010-03-03 13:35:58 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2010-03-03 13:35:58 +0000 |
| commit | dcdbc648acba235d9ada61518b6948bc3100d28c (patch) | |
| tree | 5372dc6ebc394d3c8573140ad9923e85abdd3633 | |
| parent | 96ddd6baec383e6a8f97b29497e719b68f3880f9 (diff) | |
| download | rabbitmq-server-git-dcdbc648acba235d9ada61518b6948bc3100d28c.tar.gz | |
Deal with the possibility of there being no queues to go through
| -rw-r--r-- | src/rabbit_channel.erl | 7 |
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 |
