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
1 changed files with 4 additions and 4 deletions

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