diff options
| author | Matthias Radestock <matthias@lshift.net> | 2009-08-24 18:30:11 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2009-08-24 18:30:11 +0100 |
| commit | 88689b125975c1fc5a91edf5d3ea39a671ab876e (patch) | |
| tree | 2c1429328f761cd87925b500055e85c339f4ce38 | |
| parent | 0d05ba73eb3c894ebccc27555e43734a5283b637 (diff) | |
| download | rabbitmq-server-git-88689b125975c1fc5a91edf5d3ea39a671ab876e.tar.gz | |
cosmetic
| -rw-r--r-- | src/rabbit_mixed_queue.erl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_mixed_queue.erl b/src/rabbit_mixed_queue.erl index 08d45094bb..7cda1004cc 100644 --- a/src/rabbit_mixed_queue.erl +++ b/src/rabbit_mixed_queue.erl @@ -294,9 +294,9 @@ publish(Msg, State = #mqstate { mode = disk, queue = Q, length = Length, msg_buf = MsgBuf }) -> MsgBuf1 = inc_queue_length(Q, MsgBuf, 1), ok = rabbit_disk_queue:publish(Q, Msg, false), - MsgSize = size_of_message(Msg), - {ok, gain_memory(MsgSize, State #mqstate { msg_buf = MsgBuf1, - length = Length + 1 })}; + {ok, gain_memory(size_of_message(Msg), + State #mqstate { msg_buf = MsgBuf1, + length = Length + 1 })}; publish(Msg = #basic_message { is_persistent = IsPersistent }, State = #mqstate { queue = Q, mode = mixed, is_durable = IsDurable, msg_buf = MsgBuf, length = Length }) -> @@ -304,8 +304,7 @@ publish(Msg = #basic_message { is_persistent = IsPersistent }, State = true -> rabbit_disk_queue:publish(Q, Msg, false); false -> ok end, - MsgSize = size_of_message(Msg), - {ok, gain_memory(MsgSize, + {ok, gain_memory(size_of_message(Msg), State #mqstate { msg_buf = queue:in({Msg, false}, MsgBuf), length = Length + 1 })}. |
