First write to a remotely-closed socket does not trigger exception, can it? Java
问题 I have not been able to find a satisfying answer to this question anywhere. Could someone with an understanding of the internals please explain this? I wrote a simple client/server to demonstrate this issue. The server reads one line of text then closes the socket. The client writes one line of text, waits 10 seconds, then writes two more lines of text. The second write (after 10 seconds) fails but the first write always succeeds. Why can't the BufferedWriter throw an exception on the first