fix(http_connect): don't check status on_start

This commit is contained in:
Shawn 2021-12-20 11:36:52 +08:00
parent a879ec0f3a
commit 27de3139a4
1 changed files with 4 additions and 9 deletions

View File

@ -173,16 +173,11 @@ on_start(InstId, #{base_url := #{scheme := Scheme,
base_path => BasePath,
request => preprocess_request(maps:get(request, Config, undefined))
},
case do_health_check(Host, Port, ConnectTimeout) of
ok ->
case ehttpc_sup:start_pool(PoolName, PoolOpts) of
{ok, _} -> {ok, State};
{error, {already_started, _}} -> {ok, State};
{error, Reason} ->
{error, Reason}
end;
{error, Reason} ->
{error, {http_start_failed, Reason}}
end.
on_stop(InstId, #{pool_name := PoolName}) ->