|Bug 219368 - Indefinite hang on HTTP connection to unresponsive site - back again [message #1767900]
||Wed, 12 July 2017 05:31
| Chris Lake
Registered: November 2015
I'm trying to isolate a problem a user has downloading plugins from a p2 repo. After much searching and debugging I finally came across https://bugs.eclipse.org/bugs/show_bug.cgi?id=219368.
So now I'm looking for some kind of confirmation of what I've found and whether a new bug needs to be raised.
So the above bug is exactly the problem we are experiencing. However, the fix that was applied no longer seems to work. I've found that the setting of the System properties doesn't apply to the created connection. This ties up with a SO question someone else found (https://stackoverflow.com/questions/39959775/httpurlconnection-timeout-not-working-by-setting-the-system-properties)
, the connection is created as
urlConnection = getRemoteFileURL().openConnection();
Trying a simple application, we can see the following:
URL bundleUrl = new URL(BASEURL + "/plugins/" + bundleName);
URLConnection bundleUrlConn = bundleUrl.openConnection();
// Using the IDE you can see:
// bundleUrlConn.connectTimeout (HttpURLConnection)= -1
// bundleUrlConn.connectTimeout (URLConnection) = 0
// bundleUrlConn.readTimeout (HttpURLConnection)= -1
// bundleUrlConn.readTimeout (URLConnection) = 0
// So the following is required to set the properties correctly
So I think the fix needs to be updated to use the set*Timeout methods. Does that sound about right?
Powered by FUDForum
. Page generated in 0.02401 seconds