@@ -85,6 +85,16 @@ automatic discovery, perform one of the following actions:
8585- Specify ``false`` as the value of the ``directConnection`` parameter.
8686- Specify more than one host in the replica set.
8787
88+ .. note::
89+
90+ The ``MongoClient`` constructor is *non-blocking*.
91+ When you connect to a replica set, the constructor returns immediately while the
92+ client uses background threads to connect to the replica set.
93+
94+ If you construct a ``MongoClient`` and immediately print the string representation
95+ of its ``nodes`` attribute, the list might be empty while the client connects to
96+ the replica-set members.
97+
8898The following examples show how to connect to a MongoDB replica set running on port
8999``27017`` of three different hosts by using either the ``ConnectionString`` or
90100``MongoClientSettings`` class. Select the tab that corresponds to your preferred class.
@@ -109,12 +119,6 @@ The following examples show how to connect to a MongoDB replica set running on p
109119 :end-before: end-connect-rs-settings
110120 :dedent:
111121
112- .. note::
122+ .. note:: Replica Set in Docker
113123
114- The ``MongoClient`` constructor is *non-blocking*.
115- When you connect to a replica set, the constructor returns immediately while the
116- client uses background threads to connect to the replica set.
117-
118- If you construct a ``MongoClient`` and immediately print the string representation
119- of its ``nodes`` attribute, the list might be empty while the client connects to
120- the replica-set members.
124+ .. sharedinclude:: dbx/docker-replica-set.rst
0 commit comments