Skip to content

Commit

Permalink
Merge 3083fbf into f79bd06
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Oct 15, 2019
2 parents f79bd06 + 3083fbf commit bb9d9c2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/statsderl_pool.erl
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,28 @@ sample_scaled(RateInt, Operation) ->
atom().

server_name(N) ->
case statsderl_pool_foil:lookup(N) of
try statsderl_pool_foil:lookup(N) of
{ok, Value} ->
Value;
{error, _Reason} ->
undefined
catch
error:undef ->
undefined
end.

-spec size() ->
pool_size().

size() ->
case statsderl_pool_foil:lookup(pool_size) of
try foil:lookup(?MODULE, pool_size) of
{ok, Value} ->
Value;
{error, _Reason} ->
undefined
1
catch
error:undef ->
1
end.

%% private
Expand Down

0 comments on commit bb9d9c2

Please sign in to comment.