Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4066000

Interruption fails with SocketInputStreams

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.3, 1.1.4
    • core-libs
    • None
    • x86
    • windows_nt



      Name: rlT66838 Date: 07/21/97


      The problem is really quite simple: When you do a read() on an SocketInputStream the thread executing the read() blocks if there is no input available.
      Normally you should be able to interrupt() the thread, getting an InterruptedIOException and terminating the read(). But in the case of SocketInputStream this does
      not work. When exchanging the SocketInputStream with a PipedInputStream in my test program, everything works as expected.
      Im my opinion, the implementation of SocketInputStream is broken.


      ======================================================================

            brenaudsunw Benjamin Renaud (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: