FollowRedirects: Unconditionally release the connection if there is an error
There is no need for streaming the body if there is no body
This commit is contained in:
parent
9df5918974
commit
12fa5541f0
@ -55,6 +55,10 @@ defp redirect(env, next, left) do
|
||||
release_conn(opts)
|
||||
{:error, {__MODULE__, :too_many_redirects}}
|
||||
|
||||
{:error, _} = e ->
|
||||
release_conn(opts)
|
||||
e
|
||||
|
||||
other ->
|
||||
unless opts[:body_as] == :chunks do
|
||||
release_conn(opts)
|
||||
|
Loading…
Reference in New Issue
Block a user