summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_variable_queue.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index 625c34513e..8799fff31a 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -488,10 +488,10 @@ fetch(AckRequired, State = #vqstate { q4 = Q4,
Rem = fun () -> ok = rabbit_msg_store:remove(MsgStore, [Guid]) end,
Ack = fun () -> rabbit_queue_index:ack([SeqId], IndexState1) end,
IndexState2 =
- case {MsgOnDisk, IndexOnDisk, AckRequired, IsPersistent} of
- {true, false, false, _} -> Rem(), IndexState1;
- {true, true, false, _} -> Rem(), Ack();
- {true, true, true, false} -> Ack();
+ case {AckRequired, MsgOnDisk, IndexOnDisk, IsPersistent} of
+ {false, true, false, _} -> Rem(), IndexState1;
+ {false, true, true, _} -> Rem(), Ack();
+ { true, true, true, false} -> Ack();
_ -> IndexState1
end,