aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Capper <steve.capper@linaro.org>2015-11-20 11:32:15 +0000
committerSteve Capper <steve.capper@linaro.org>2015-11-20 11:36:48 +0000
commit8583f70e09efb7296c5561e3332ee29650d1efd5 (patch)
tree76aa3d155dd44a82e2053d86f2466cc1d0db1979
parent2cda57a33df706b92e768297070d13c0bd807bfd (diff)
BIGTOP: stop downloads from breaking web proxiesodpi/linaro-branch-1.0
The Gradle build script creates a URL connection to ascertain whether or not a URL is valid. Unfortunately this also blocks squid leading to a hang whilst downloading files. This patch disconnects the temporary network connection allowing the build scripts to function with a web proxy. Signed-off-by: Steve Capper <steve.capper@linaro.org>
-rw-r--r--packages.gradle4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages.gradle b/packages.gradle
index c54d6897..8ef47d0f 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -74,7 +74,9 @@ def touchTargetFile = { fileName ->
def ifExists = { url ->
if (url == null) return
URLConnection uCon = new URL(url).openConnection()
- return (uCon as HttpURLConnection).responseCode == 200
+ def retval = (uCon as HttpURLConnection).responseCode == 200
+ uCon.disconnect()
+ return retval
}
def getDate() {
new Date().format('E, dd MMM yyyy HH:mm:ss Z')