Skip to content
Permalink
Browse files

[FIXED JENKINS-42371] - Call disconnect() on HttpURLConnection object (

…#152)

[FIXED JENKINS-42371] - Call disconnect() on HttpURLConnection object
  • Loading branch information
nehaljwani authored and oleg-nenashev committed Feb 28, 2017
1 parent 785661c commit 75f9faba9890d5e26db5a13bd87913b57c69fbf7
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/hudson/remoting/Launcher.java
@@ -376,8 +376,9 @@ private SSLSocketFactory getSSLSocketFactory()
}
}
while (true) {
URLConnection con = null;
try {
URLConnection con = Util.openURLConnection(slaveJnlpURL);
con = Util.openURLConnection(slaveJnlpURL);
if (con instanceof HttpURLConnection) {
HttpURLConnection http = (HttpURLConnection) con;
if (slaveJnlpCredentials != null) {
@@ -462,6 +463,11 @@ private SSLSocketFactory getSSLSocketFactory()
System.err.println("Waiting 10 seconds before retry");
Thread.sleep(10*1000);
// retry
} finally {
if (con instanceof HttpURLConnection) {
HttpURLConnection http = (HttpURLConnection) con;
http.disconnect();
}
}
}
}

0 comments on commit 75f9fab

Please sign in to comment.
You can’t perform that action at this time.