diff options
author | Sergei Shuvatov <[email protected]> | 2022-03-08 12:27:47 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2022-03-08 12:32:41 +0100 |
commit | 4dd6f090e35f9cf067089dfce953647a0999d306 (patch) | |
tree | f54f26cf0d53e91ace5d597247aaefd06fd9f012 /src | |
parent | f6a79d54a85ceb16cc5e6bd58173733228f00389 (diff) | |
download | gun-4dd6f090e35f9cf067089dfce953647a0999d306.tar.gz gun-4dd6f090e35f9cf067089dfce953647a0999d306.tar.bz2 gun-4dd6f090e35f9cf067089dfce953647a0999d306.zip |
gun_pool Dialyzer fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/gun_pool.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gun_pool.erl b/src/gun_pool.erl index 8c40788..5d49a7c 100644 --- a/src/gun_pool.erl +++ b/src/gun_pool.erl @@ -146,7 +146,7 @@ -record(state, { host :: inet:hostname() | inet:ip_address(), port :: inet:port_number(), - opts :: gun:opts(), + opts :: opts(), table :: ets:tid(), conns :: #{pid() => down | {setup, any()} | {up, http | http2 | ws | raw, map()}}, conns_meta = #{} :: meta(), @@ -221,7 +221,7 @@ await_up(Authority, Scope) -> gen_statem:call(ManagerPid, await_up, 5000) end. --spec checkout(pid(), req_opts()) -> undefined | {pid(), map()}. +-spec checkout(pid(), req_opts() | ws_send_opts()) -> undefined | {pid(), map()}. checkout(ManagerPid, ReqOpts=#{checkout_retry := Retry}) when is_list(Retry) -> CallTimeout = maps:get(checkout_call_timeout, ReqOpts, 5000), case gen_server:call(ManagerPid, {checkout, ReqOpts}, CallTimeout) of @@ -381,6 +381,7 @@ authority(Headers) -> {_, Authority} = lists:keyfind(<<"host">>, 1, Headers), Authority. +-spec get_pool(iolist(), req_opts() | ws_send_opts() | stop_opts()) -> pid() | undefined. get_pool(Authority0, ReqOpts) -> Authority = iolist_to_binary(Authority0), %% @todo Perhaps rename this to temporary. |