summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-08-14 12:51:41 +0100
committerMatthew Sackman <matthew@lshift.net>2009-08-14 12:51:41 +0100
commit3204a927abbcf9d1079d3be740c2b5b60aaf4b80 (patch)
treec9804a88fe30b9a7d6587477a9deff0948a99fc6
parent202138a1d722a806891ddada37bf42df31f68ca8 (diff)
downloadrabbitmq-server-git-3204a927abbcf9d1079d3be740c2b5b60aaf4b80.tar.gz
case => if. This is the last of the corrections for the prefetcher from comment #8
-rw-r--r--src/rabbit_queue_prefetcher.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rabbit_queue_prefetcher.erl b/src/rabbit_queue_prefetcher.erl
index ec969bfca6..c847848de8 100644
--- a/src/rabbit_queue_prefetcher.erl
+++ b/src/rabbit_queue_prefetcher.erl
@@ -213,10 +213,9 @@ handle_call({publish, { Msg = #basic_message {},
msg_buf = MsgBuf, buf_length = Length, queue = Q
}) ->
gen_server2:reply(DiskQueue, ok),
- Timeout = case Fetched + 1 == Target of
- true -> hibernate;
- false -> ok = rabbit_disk_queue:prefetch(Q),
- infinity
+ Timeout = if Fetched + 1 == Target -> hibernate;
+ true -> ok = rabbit_disk_queue:prefetch(Q),
+ infinity
end,
MsgBuf1 = queue:in({Msg, IsDelivered, AckTag}, MsgBuf),
{noreply, State #pstate { fetched_count = Fetched + 1,