Skip to content

Commit e10b6d7

Browse files
committed
JAVA-1285: When waiting for the cluster description, force a connection attempt each time through the loop
1 parent 43284f0 commit e10b6d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/com/mongodb/BaseCluster.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ public ClusterDescription getDescription(final long maxWaitTime, final TimeUnit
110110
LOGGER.info(format("Cluster description not yet available. Waiting for %d ms before timing out",
111111
MILLISECONDS.convert(timeout, NANOSECONDS)));
112112

113+
connect();
114+
113115
if (!currentPhase.await(timeout, NANOSECONDS)) {
114116
throw new MongoTimeoutException(format("Timed out while waiting to connect after %d ms",
115117
MILLISECONDS.convert(maxWaitTime, timeUnit)));

0 commit comments

Comments
 (0)