diff options
author | Damien F. Katz <damien@apache.org> | 2009-04-09 22:36:49 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2009-04-09 22:36:49 +0000 |
commit | 7db96420155d3fe6b6d8b5eaa10660a65d19b8cc (patch) | |
tree | cd567e1ef48f30a2799e009d321dea7618b1b0b6 /src | |
parent | 32c0c563284d4541930bc14dcfe92de11590de93 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_file.erl | 6 |
1 files changed, 3 insertions, 3 deletions
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) -> |