return error if connection failed to open

This commit is contained in:
Alexander Strizhakov 2020-03-03 16:27:46 +03:00
parent 7d68924e4f
commit 8fc00b7cbf
No known key found for this signature in database
GPG key ID: 022896A53AEF1381

View file

@ -90,7 +90,7 @@ defp do_open(uri, %{proxy: {proxy_host, proxy_port}} = opts) do
} #{inspect(error)}"
)
nil
error
end
end
@ -126,7 +126,7 @@ defp do_open(uri, %{proxy: {proxy_type, proxy_host, proxy_port}} = opts) do
} #{inspect(error)}"
)
nil
error
end
end
@ -144,7 +144,7 @@ defp do_open(%URI{host: host, port: port} = uri, opts) do
}"
)
nil
error
end
end
@ -169,7 +169,7 @@ defp close_least_used_and_do_open(name, uri, opts) do
do_open(uri, opts)
else
[] -> nil
[] -> {:error, :pool_overflowed}
end
end
end