summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-06-09 11:06:11 +0100
committerMatthew Sackman <matthew@lshift.net>2009-06-09 11:06:11 +0100
commitfc2087cf56032928675877bc16c4808f819c9d99 (patch)
tree167f3f468065152a55d3ac302168e205f9015b1d
parent6bdb029e29d5bb22b56488b6aa25592cccf37f7a (diff)
downloadrabbitmq-server-fc2087cf56032928675877bc16c4808f819c9d99.tar.gz
Logic failure which only came to light when trying to run the consumers as documented in bug 20470
-rw-r--r--src/rabbit_amqqueue_process.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index b61e450b..81dea027 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -178,9 +178,11 @@ deliver_queue(Fun, FunAcc0,
unsent_message_count = Count,
unacked_messages = UAM} = ch_record(ChPid),
IsMsgReady = Fun(is_message_ready, FunAcc0, State),
- case not(AckRequired) orelse
- ( IsMsgReady andalso
- rabbit_limiter:can_send( LimiterPid, self())
+ case IsMsgReady
+ andalso
+ ( (not AckRequired)
+ orelse
+ rabbit_limiter:can_send( LimiterPid, self() )
) of
true ->
case Fun(AckRequired, FunAcc0, State) of