We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75cee56 commit 9ad28d4Copy full SHA for 9ad28d4
driver-core/src/main/com/mongodb/internal/connection/DefaultServerMonitor.java
@@ -178,8 +178,9 @@ private ServerDescription lookupServerDescription(final ServerDescription curren
178
try {
179
if (connection == null || connection.isClosed()) {
180
currentCheckCancelled = false;
181
- connection = internalConnectionFactory.create(serverId);
182
- connection.open();
+ InternalConnection newConnection = internalConnectionFactory.create(serverId);
+ newConnection.open();
183
+ connection = newConnection;
184
averageRoundTripTime.addSample(connection.getInitialServerDescription().getRoundTripTimeNanos());
185
return connection.getInitialServerDescription();
186
}
0 commit comments