Connection timeout is ignored in ConnectionStatus

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.10.0
    • Affects Version/s: 2.9.1
    • Component/s: Configuration
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Jeffrey Yemin
              Reporter:
              Lukas Krecan
              None
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: