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

TelnetInputStream returns -1 on socket timeout

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 3.0.1
    • None
    • Telnet
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: