Skip to content

Commit

Permalink
fix: use mint passive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yordis committed May 15, 2023
1 parent e7c4371 commit 58f5523
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/tesla/adapter/mint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ if Code.ensure_loaded?(Mint.HTTP) do
_ -> opts
end

opts = Map.put_new(opts, :mode, :passive)

with {:ok, conn} <-
HTTP.connect(String.to_atom(uri.scheme), uri.host, uri.port, Enum.into(opts, [])) do
# If there were redirects, and passed `closed_conn: false`, we need to close opened connections to these intermediate hosts.
Expand Down

0 comments on commit 58f5523

Please sign in to comment.