Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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