Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-676

TelnetInputStream returns -1 on socket timeout

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: Telnet
    • Labels:
      None

      Description

      I am using TelnetClient with threading disabled. When setting the socket timeout via TelnetClient.setSoTimeout I would expect any reads that timeout to throw a SocketTimeoutException. However, instead the read returns a -1.

      I can see in TelnetInputStream line 404 that the exception thrown by the underlying stream will be caught and an EOF returned.

      This seems to break the API contract. Is there any reason for this behavior or is it an oversight?

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ieuric1 Ieuan Richards
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: