summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-08-16 16:14:53 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-08-16 16:14:53 +0100
commit1ebd2e52a0d15f94b1105abe866026d916ba72d9 (patch)
tree717aab3b8a6b64bb0110f0f58c0138e42cb42d71
parent7966fb26206fde37c4485750c91cadb656aa0010 (diff)
downloadrabbitmq-server-1ebd2e52a0d15f94b1105abe866026d916ba72d9.tar.gz
Whoops. Be consistent about comparisons
-rw-r--r--src/file_handle_cache.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index b6b9c3e4..1f5fe7b1 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -758,6 +758,7 @@ handle_call(obtain, From, State = #fhc_state { obtains_count = ObtainsCount,
false ->
{reply, ok, State1}
end;
+
handle_call({open, Pid, EldestUnusedSince, CanClose}, From, State =
#fhc_state { limit = Limit, opens_count = OpensCount,
opens_pending = Pending, elders = Elders }) ->
@@ -766,7 +767,7 @@ handle_call({open, Pid, EldestUnusedSince, CanClose}, From, State =
obtains_count = ObtainsCount1 } =
maybe_reduce(State #fhc_state { opens_count = OpensCount + 1,
elders = Elders1 }),
- case Limit =/= infinity andalso OpensCount1 + ObtainsCount1 > Limit of
+ case Limit =/= infinity andalso OpensCount1 + ObtainsCount1 >= Limit of
true ->
State2 = State1 #fhc_state { opens_count = OpensCount1 - 1 },
case CanClose of