Skip to content

Commit 5ff264e

Browse files
committed
Use the ServerVersion from the connection
JAVA-2854
1 parent dcc3ba7 commit 5ff264e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver-embedded/src/main/com/mongodb/embedded/client/EmbeddedServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.mongodb.connection.Connection;
2626
import com.mongodb.connection.Server;
2727
import com.mongodb.connection.ServerDescription;
28-
import com.mongodb.connection.ServerVersion;
2928
import com.mongodb.diagnostics.logging.Logger;
3029
import com.mongodb.diagnostics.logging.Loggers;
3130
import com.mongodb.event.CommandListener;
@@ -169,7 +168,8 @@ private ServerDescription createServerDescription() {
169168
long start = System.nanoTime();
170169
BsonDocument isMasterResult = CommandHelper.executeCommand("admin", new BsonDocument("ismaster", new BsonInt32(1)),
171170
clusterClock, connection);
172-
return DescriptionHelper.createServerDescription(serverAddress, isMasterResult, new ServerVersion(), System.nanoTime() - start);
171+
return DescriptionHelper.createServerDescription(serverAddress, isMasterResult, connection.getDescription().getServerVersion(),
172+
System.nanoTime() - start);
173173
} finally {
174174
connection.close();
175175
}

0 commit comments

Comments
 (0)