Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hung thread on CRLRevocationManager#getCrlFromUri() due to not having a read timeout set on URLConnection #257

Closed
leoclee opened this issue Apr 7, 2016 · 0 comments · Fixed by #258

Comments

@leoclee
Copy link

leoclee commented Apr 7, 2016

In the Java RI's CRLRevocationManager (in the agent), there is a URLConnection that has a connect timeout set, but no read timeout set, which defaults to 0 (which means infinite timeout). This can cause threads to be hung on line 364 (the last line in the snippet below):

                // create a URL connection object from the distribution point
                URLConnection urlConnection = new URL(crlUrlString).openConnection();
                urlConnection.setConnectTimeout(CRL_FETCH_TIMEOUT);

                // get the input stream
                InputStream crlInputStream = urlConnection.getInputStream();
leoclee pushed a commit to leoclee/nhin-d that referenced this issue Apr 7, 2016
gm2552 pushed a commit that referenced this issue Apr 11, 2016
Merging change: set read timeout on URLConnection; fixes #257
gm2552 pushed a commit that referenced this issue Apr 11, 2016
#257

Committing tag agent 2.0.16.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant