Skip to content

Commit

Permalink
Merge pull request esl#4 from richcarl/more-klarna-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tolbrino committed Oct 29, 2011
2 parents 35ce6c1 + 02d1c1d commit 621a6f8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{erl_opts, [debug_info]}.
{cover_enabled, true}.
8 changes: 0 additions & 8 deletions src/lhttpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@
-spec start(normal | {takeover, node()} | {failover, node()}, any()) ->
{ok, pid()}.
start(_, _) ->
case lists:member({seed,1}, ssl:module_info(exports)) of
true ->
% Make sure that the ssl random number generator is seeded
% This was new in R13 (ssl-3.10.1 in R13B vs. ssl-3.10.0 in R12B-5)
ssl:seed(crypto:rand_bytes(255));
false ->
ok
end,
lhttpc_sup:start_link().

%% @hidden
Expand Down
8 changes: 8 additions & 0 deletions src/lhttpc_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ start_link() ->
-spec init(any()) -> {ok, #httpc_man{}}.
init(_) ->
process_flag(priority, high),
case lists:member({seed,1}, ssl:module_info(exports)) of
true ->
% Make sure that the ssl random number generator is seeded
% This was new in R13 (ssl-3.10.1 in R13B vs. ssl-3.10.0 in R12B-5)
ssl:seed(crypto:rand_bytes(255));
false ->
ok
end,
{ok, Timeout} = application:get_env(lhttpc, connection_timeout),
{ok, #httpc_man{timeout = Timeout}}.

Expand Down
2 changes: 1 addition & 1 deletion src/lhttpc_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
%% @end
-spec start_link() -> {ok, pid()} | {error, atom()}.
start_link() ->
supervisor:start_link(?MODULE, nil).
supervisor:start_link({local, ?MODULE}, ?MODULE, []).

%% @hidden
-spec init(any()) -> {ok, {{atom(), integer(), integer()}, [child()]}}.
Expand Down

0 comments on commit 621a6f8

Please sign in to comment.