HTTPUrlConnection.getInputStream possibly not giving EOS condition...

S

Syed Ali

Hi,

Here is the code that blocks sometimes causing the whole application to
hang:

HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
==> BufferedReader buf_str =new BufferedReader(new
InputStreamReader(conn.getInputStream()));

Has anyone experienced this before? Even if the InputStream misbehaves,
there *must* be a way for the BufferedReader to eventually error out (due to
timeout or other such errors).

Any help or comments will be appreciated.

thanks,

-Syed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top