-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
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(); }