summaryrefslogtreecommitdiff
path: root/src/rabbit_backing_queue_qc.erl
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2011-07-06 14:41:47 +0100
committerEmile Joubert <emile@rabbitmq.com>2011-07-06 14:41:47 +0100
commit2888edcdf93b87a205d5444c2c7d153746af9a23 (patch)
treed7888c4e9d04556705bb4e86a7a1686f6c8c6f28 /src/rabbit_backing_queue_qc.erl
parentcc3e6b3de6814b6dd4ca467da41e4131fd0b3632 (diff)
downloadrabbitmq-server-2888edcdf93b87a205d5444c2c7d153746af9a23.tar.gz
Minor refactor
Diffstat (limited to 'src/rabbit_backing_queue_qc.erl')
-rw-r--r--src/rabbit_backing_queue_qc.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rabbit_backing_queue_qc.erl b/src/rabbit_backing_queue_qc.erl
index 9aaee160..6424976a 100644
--- a/src/rabbit_backing_queue_qc.erl
+++ b/src/rabbit_backing_queue_qc.erl
@@ -38,7 +38,7 @@
-record(state, {bqstate,
len, %% int
messages, %% queue of {msg_props, basic_msg}
- acks, %% list of {acktag, {message_props, basic_msg}}
+ acks, %% list of {acktag, {msg_props, basic_msg}}
confirms}). %% set of msgid
%% Initialise model
@@ -297,12 +297,10 @@ repeat(Result, _Fun, 0) ->
repeat(Result, Fun, Times) ->
repeat(Fun(Result), Fun, Times - 1).
-publish_multiple(_Msg, _MsgProps, BQ, 0) ->
- BQ;
publish_multiple(Msg, MsgProps, BQ, Count) ->
- publish_multiple(Msg, MsgProps,
- ?BQMOD:publish(Msg, MsgProps, self(), BQ),
- Count - 1).
+ repeat(BQ, fun(BQ1) ->
+ ?BQMOD:publish(Msg, MsgProps, self(), BQ1)
+ end, Count).
timeout(BQ, 0) ->
BQ;