On 19 Jul, 19:29, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
More in the continuing saga. It appears now that I'm really having a
problem getting the BufferedInputStream.read() to throw an exception
when the stream is closed. I've tried closing the input stream and the
socket and it appears that neither is causing the exception to be thrown.
--
Knute Johnson
email s/nospam/knute/
I've had problems with BufferedInputStream.read() on Windows XP
machines with the problem you describe. Although a BufferedInputStream
will not throw an exception, I seem to remember that it will reliably
return a -1 to indicate that the end of the stream has been reached
after the server has closed the socket (and if you perform another
read it seems to block indefinitely).
Are you definitely checking for this scenario? It was a while ago and
unfortunately I don't have access to a Windows machine at the moment
so I can't confirm it, but thought I would throw it in as a suggestion
anyway.
Thanks for the idea but yes I am checking for end of stream. I'm going
differences.