summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-07-07 23:44:36 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-07-07 23:44:36 +0100
commita750351082950358a41189f7a00dca1c6203a587 (patch)
treee726b6710feca76e92ceb973f3455720b76a807d /src
parent82cead22a08638503c311b854f89cda3446d62d4 (diff)
downloadrabbitmq-server-git-a750351082950358a41189f7a00dca1c6203a587.tar.gz
minor refactor
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_variable_queue.erl14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index eb711b428f..04ec96287d 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -915,14 +915,12 @@ tx_commit_post_msg_store(IsTransientPubs, Pubs, AckTags, Fun,
%% persistent acks) then we can skip the queue_index loop.
case (not IsDurable) orelse
(IsTransientPubs andalso
- lists:foldl(
- fun (AckTag, true ) ->
- case dict:find(AckTag, PA) of
- {ok, #msg_status {}} -> true;
- {ok, {IsPersistent, _Guid}} -> not IsPersistent
- end;
- (_AckTag, false) -> false
- end, true, AckTags)) of
+ lists:all(fun (AckTag) ->
+ case dict:find(AckTag, PA) of
+ {ok, #msg_status {}} -> true;
+ {ok, {IsPersistent, _Guid}} -> not IsPersistent
+ end
+ end, AckTags)) of
true -> State1 = tx_commit_index(State #vqstate {
on_sync = {[], [Pubs], [Fun]} }),
State1 #vqstate { on_sync = OnSync };