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

Connection timeout is ignored in ConnectionStatus

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.10.0
    • Affects Version/s: 2.9.1
    • Component/s: Configuration
    • None

      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();
              }
      

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

              Created:
              Updated:
              Resolved: