Skip to content

Commit

Permalink
Extend gen_server timeout to 60 seconds
Browse files Browse the repository at this point in the history
Some processes take longer than the default timeout if they
were paged out and need to be brought back in before acting
on new data.
  • Loading branch information
mattsta committed Jan 18, 2012
1 parent bb3e542 commit 3a108b6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/stdinout.erl
Expand Up @@ -6,6 +6,9 @@
-export([reload/1]).
-export([pipe/2]).
-export([shutdown/1]).

-define(TIMEOUT, 60000).

%%====================================================================
%% Starting
%%====================================================================
Expand All @@ -22,15 +25,15 @@ start_link(GenServerName, Cmd, IP, Port, SocketCount) ->
%% respawn all running processes
%%====================================================================
reload(Server) ->
gen_server:call(Server, reload).
gen_server:call(Server, reload, ?TIMEOUT).

%%====================================================================
%% stdin->stdout through pool or network
%%====================================================================
send({Host, Port}, Content) ->
send(Host, Port, Content);
send(Server, Content) ->
gen_server:call(Server, {stdin, Content}).
gen_server:call(Server, {stdin, Content}, ?TIMEOUT).

%%====================================================================
%% stdin->stdout through network
Expand Down

0 comments on commit 3a108b6

Please sign in to comment.