Priority: Trivial - P5
Affects Version/s: 3.0, 3.0.1
Fix Version/s: 3.0.2
I'm passing around a MongoClient and sometimes need to know what I'm connected to (previously we used host, port).
It looks like client.nodes is empty for sometime after Client creation:
List of all connected servers.
Nodes are either specified when this instance was created, or discovered through the replica set discovery mechanism.
In this case nodes is empty, so is neither what was passed into the MongoClient, nor discovered...
If you put a server_info() in there, then nodes is reliable. Is there a better way to get the original connection string?