unclear documentation of connect() with timeout of 0

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • None
    • beta2
    • generic
    • generic

      The javadoc for the connect() method in java.net.Socket
      says:

          /**
           * Connects this socket to the server with a specified timeout value.
           * A timeout value of zero means no timeout. The connection will then
           * block until established or an error occurs.
           ...
           */


      This is potentially confusing. Instead, we should document this
      with wording similar to the javadoc for setSoTimeout() which says:

          * A timeout of zero is interpreted as an infinite timeout.

      The same issue exists in java.net.SocketImpl for it's connect()
      method.

            Assignee:
            Jean-Christophe Collet (Inactive)
            Reporter:
            Jeffrey Nisewanger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: