- defp maybe_get_conn(adapter_opts, uri, connection_opts) do
- {receive_conn?, opts} =
- adapter_opts
- |> Keyword.merge(connection_opts)
- |> Keyword.pop(:receive_conn, true)
-
- if Connections.alive?(:gun_connections) and receive_conn? do
- try_to_get_conn(uri, opts)
- else
- opts
- end
- end
-
- defp try_to_get_conn(uri, opts) do
- case Connections.checkin(uri, :gun_connections) do
- nil ->
- Logger.debug(
- "Gun connections pool checkin was not successful. Trying to open conn for next request."
- )
+ @spec pool_timeout(pool()) :: non_neg_integer()
+ def pool_timeout(pool) do
+ default = Config.get([:pools, :default, :recv_timeout], 5_000)