summaryrefslogtreecommitdiff
path: root/src/fsyncport.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/fsyncport.erl')
-rw-r--r--src/fsyncport.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fsyncport.erl b/src/fsyncport.erl
index b688f9c..ef8b37f 100644
--- a/src/fsyncport.erl
+++ b/src/fsyncport.erl
@@ -4,7 +4,7 @@
-module(fsyncport).
-behaviour(gen_server).
-export([start_link/0, stop/0]).
--export([fsync/1, fsyncall/1]).
+-export([fsync/1, fsyncall/2]).
%% gen_server callbacks.
-export([init/1, handle_call/3, terminate/2, handle_cast/2, handle_info/2,
code_change/3]).
@@ -19,8 +19,10 @@ stop() ->
fsync(Path) ->
gen_server:call(?MODULE, {fsync, [Path]}).
-fsyncall(Paths) ->
- gen_server:call(?MODULE, {fsync, Paths}).
+fsyncall([], Timeout) ->
+ ok;
+fsyncall(Paths, Timeout) ->
+ gen_server:call(?MODULE, {fsync, Paths}, Timeout).
-record(state, {idleports, busyports, waiting, requests}).