diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-10-21 21:48:39 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-10-21 21:48:39 -0400 |
commit | b25b5b1966960a580293a0bdefcf8d290efe9b4d (patch) | |
tree | cf0b27ef309efc4ba42b9476e907c9f17a8825f5 /apps/couch | |
parent | 32f2dd98328c99b4ca80e907d7d164cf44c02824 (diff) |
use erlang:send_after/3 instead of timer version
http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id52228
Diffstat (limited to 'apps/couch')
-rw-r--r-- | apps/couch/src/couch_file.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/couch/src/couch_file.erl b/apps/couch/src/couch_file.erl index 2d539f64..b3d91bb4 100644 --- a/apps/couch/src/couch_file.erl +++ b/apps/couch/src/couch_file.erl @@ -237,7 +237,7 @@ init_status_error(ReturnPid, Ref, Error) -> init({Filepath, Options, ReturnPid, Ref}) -> process_flag(trap_exit, true), - timer:send_after(60000, maybe_close), + erlang:send_after(60000, self(), maybe_close), case lists:member(create, Options) of true -> filelib:ensure_dir(Filepath), @@ -489,7 +489,7 @@ handle_info(maybe_close, Fd) -> [?MODULE, self()]), {stop, normal, Fd}; _Else -> - timer:send_after(10000, maybe_close), + erlang:send_after(10000, self(), maybe_close), {noreply, Fd} end; handle_info({'EXIT', _, normal}, Fd) -> |