java.net

M

Marcin

Hello,

Does anyone have an idea how can I interrupt
HttpUrlConnection.getInputStream()?

I have 2 threads. First one opens stream using HttpUrlConnection method
getInputStream(). Second one is monitoring transfer in the first thread.
When transfer is below some number second thread tries to interrupt first.
It looks sometimes (in special condition that are caused by me, for
example :I halt internet traffic or do some changes in my proxy
configuration) that getInputStream() method locks and can't be interrupted.
I tried interrupt() method from Thread class, but id doesnn't work.
I tried also to close streams, but it turned out that they were not open
yet.

Is there any technic to take full control over http connection ?

Martin
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top