summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2009-11-24 23:55:18 +0000
committerMatthias Radestock <matthias@lshift.net>2009-11-24 23:55:18 +0000
commitcd2918c5851f8cba7f69ec3df17f805d3ddfc0b0 (patch)
tree75bc54d1f4c3f28b43f8a7112afb6783f9142700
parenta5b946dabf41a6f4de76ca2cb71d0b9b281be189 (diff)
downloadrabbitmq-server-git-cd2918c5851f8cba7f69ec3df17f805d3ddfc0b0.tar.gz
cosmetic
-rw-r--r--src/file_handle_cache.erl24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl
index a966d286b0..df7e656462 100644
--- a/src/file_handle_cache.erl
+++ b/src/file_handle_cache.erl
@@ -644,10 +644,12 @@ maybe_reduce(State = #fhc_state { limit = Limit, count = Count,
maybe_reduce(State) ->
State.
-%% Googling around suggests that Windows has a limit somewhere around 16M.
-%% eg http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx
-%% For everything else, assume ulimit exists. Further googling suggests that
-%% BSDs (incl OS X), solaris and linux all agree that ulimit -n is file handles
+%% Googling around suggests that Windows has a limit somewhere around
+%% 16M, eg
+%% http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx
+%% For everything else, assume ulimit exists. Further googling
+%% suggests that BSDs (incl OS X), solaris and linux all agree that
+%% ulimit -n is file handles
ulimit() ->
try
%% under Linux, Solaris and FreeBSD, ulimit is a shell
@@ -665,12 +667,10 @@ ulimit() ->
[String]),
throw({unexpected_result, String})
end
- catch
- throw:_ ->
- case os:type() of
- {win32, _OsName} ->
- ?FILE_HANDLES_LIMIT_WINDOWS;
- _ ->
- ?FILE_HANDLES_LIMIT_OTHER - ?RESERVED_FOR_OTHERS
- end
+ catch _ -> case os:type() of
+ {win32, _OsName} ->
+ ?FILE_HANDLES_LIMIT_WINDOWS;
+ _ ->
+ ?FILE_HANDLES_LIMIT_OTHER - ?RESERVED_FOR_OTHERS
+ end
end.