Uploaded image for project: 'Directory Client API'
  1. Directory Client API
  2. DIRAPI-230

Connection to invalid host blocks for 30 seconds

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-M28, 1.0.0-M29
    • Fix Version/s: 1.0.0-M30
    • Labels:
      None

      Description

      Connection to an invalid host like this

              LdapNetworkConnection conn = new LdapNetworkConnection( "qwertyuiopasdfghjklzxcvbnm", 12389 );
              conn.connect();
      

      results in a nice exception (InvalidConnectionException / UnresolvedAddressException).

      However it tries to connect for 30 seconds, only after that the exception is thrown. This looks like the default timeout is considered. I think the exception should be thrown faster.

        Activity

        Hide
        elecharny Emmanuel Lecharny added a comment -
        Show
        elecharny Emmanuel Lecharny added a comment - Fixed with http://svn.apache.org/r1670208 , tested with http://svn.apache.org/r1670220
        Hide
        elecharny Emmanuel Lecharny added a comment -

        Good catch !

        Yes, this is not a good idea to retry for 30 secs for obvious failures that are not depending from a remote peer temporarily being unreachable.

        Show
        elecharny Emmanuel Lecharny added a comment - Good catch ! Yes, this is not a good idea to retry for 30 secs for obvious failures that are not depending from a remote peer temporarily being unreachable.

          People

          • Assignee:
            Unassigned
            Reporter:
            seelmann Stefan Seelmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development