Interrupt an Http Request blocked in read() on Android
Posted
by twk
on Stack Overflow
See other posts from Stack Overflow
or by twk
Published on 2010-05-02T18:18:19Z
Indexed on
2010/05/02
18:28 UTC
Read the original article
Hit count: 375
Using the Apache Http stack on Android, I'm trying to force a thread out of a call to read. This is what the stack looks like:
OSNetworkSystem.receiveStreamImpl(FileDescriptor, byte[], int, int, int) line: not available [native method]
OSNetworkSystem.receiveStream(FileDescriptor, byte[], int, int, int) line: 478
PlainSocketImpl.read(byte[], int, int) line: 565
SocketInputStream.read(byte[], int, int) line: 87
SocketInputBuffer(AbstractSessionInputBuffer).fillBuffer() line: 103
SocketInputBuffer(AbstractSessionInputBuffer).read(byte[], int, int) line: 134
IdentityInputStream.read(byte[], int, int) line: 86
EofSensorInputStream.read(byte[], int, int) line: 159
Fetcher.readStream() line: 89
I've tried InputStream.close(), Thread.Interrupt(), and HttpUriRequest.abort(), without any success. Any ideas? I'm also open to some kind of non-blocking IO, but I don't see any way to do that with the HttpUriRequest object.
Thanks!
© Stack Overflow or respective owner