summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-06-12 06:55:14 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-06-12 06:55:14 +0100
commite4dc30e15eca767d8b9c256351c5ebe074b72251 (patch)
treeb4c2ad62e0556c287983634d6729941145915097 /src
parentc344088af6adc0d7e7027e2e13afd4e70c57d180 (diff)
downloadrabbitmq-server-git-e4dc30e15eca767d8b9c256351c5ebe074b72251.tar.gz
fix small persistent_count counting bug
...which doesn't actually matter since it would only result in the persistent_count of transient queues being wrong, which get nuked on startup anyway (the only place that makes use of the persistent_count).
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_variable_queue.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index b2eb4dc4eb..e0cb39780b 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -1180,12 +1180,12 @@ publish(Msg = #basic_message { is_persistent = IsPersistent, guid = Guid },
in_counter = InCount,
persistent_count = PCount,
durable = IsDurable }) ->
+ IsPersistent1 = IsDurable andalso IsPersistent,
MsgStatus = #msg_status {
- msg = Msg, guid = Guid, seq_id = SeqId,
- is_persistent = IsDurable andalso IsPersistent,
+ msg = Msg, guid = Guid, seq_id = SeqId, is_persistent = IsPersistent1,
is_delivered = IsDelivered, msg_on_disk = MsgOnDisk,
index_on_disk = false },
- PCount1 = maybe_inc(PCount, IsPersistent),
+ PCount1 = maybe_inc(PCount, IsPersistent1),
{SeqId, publish(test_keep_msg_in_ram(SeqId, State), MsgStatus,
State #vqstate { next_seq_id = SeqId + 1,
len = Len + 1,