Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-649

Connection timeout is ignored in ConnectionStatus

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.10.0
    • 2.9.1
    • Configuration
    • None

    Description

      Default connection timeout is used in ConnectionStatus class causing the following code stopping after 20s instead of 1s.

              MongoOptions options = new MongoOptions();
              options.connectTimeout = 1000;
       
              Mongo m = new Mongo(Arrays.asList(new ServerAddress("localhost:27017")), options);
              try {
                  m.getDB("test").collectionExists("test");
              } finally {
                  m.close();
              }

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            dart0 Lukas Krecan
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: