ProxyUtils: correctly handle the 'no proxy' case (#1148)

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-10-11 19:16:48 +05:30 committed by GitHub
parent facc4d9163
commit 591bb4e795
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ object ProxyUtils {
val host = GitSettings.proxyHost
val port = GitSettings.proxyPort
return if (host == null || port == -1) {
mutableListOf()
mutableListOf(Proxy.NO_PROXY)
} else {
mutableListOf(Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(host, port)))
}