Skip to content

Commit

Permalink
guard was a bit pointlessly complex as infinity should be usable
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardb committed May 4, 2012
1 parent 3406473 commit 38d9069
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/lhttpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,9 @@ add_pool(Name, ConnTimeout) when is_atom(Name),
application:get_env(lhttpc, pool_size)).

%% Add a new httpc_manager to the supervisor tree
-spec add_pool(atom(), non_neg_integer(), non_neg_integer()) ->
-spec add_pool(atom(), non_neg_integer(), non_neg_integer() | atom()) ->
{ok, pid()} | {error, term()}.
add_pool(Name, ConnTimeout, PoolSize) when is_atom(Name),
is_integer(ConnTimeout),
ConnTimeout > 0,
is_integer(PoolSize),
PoolSize > 0 ->
add_pool(Name, ConnTimeout, PoolSize) ->
ChildSpec = {Name,
{lhttpc_manager, start_link, [[{name, Name},
{connection_timeout, ConnTimeout},
Expand Down

0 comments on commit 38d9069

Please sign in to comment.