From 7db96420155d3fe6b6d8b5eaa10660a65d19b8cc Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Thu, 9 Apr 2009 22:36:49 +0000 Subject: Fix to allow couch_file use in tests without the server being started. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@763833 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_file.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_file.erl b/src/couchdb/couch_file.erl index 93c43434..900e369a 100644 --- a/src/couchdb/couch_file.erl +++ b/src/couchdb/couch_file.erl @@ -315,7 +315,7 @@ terminate(_Reason, _Fd) -> ok. track_stats() -> - try couch_stats_collector:increment({couchdb, open_os_files}) of + case (catch couch_stats_collector:increment({couchdb, open_os_files})) of ok -> Self = self(), spawn( @@ -323,8 +323,8 @@ track_stats() -> erlang:monitor(process, Self), receive {'DOWN', _, _, _, _} -> ok end, couch_stats_collector:decrement({couchdb, open_os_files}) - end) - catch _ -> ok + end); + _ -> ok end. handle_call({pread, Pos, Bytes}, _From, Fd) -> -- cgit v1.2.3