@@ -85,6 +85,16 @@ automatic discovery, perform one of the following actions:
85
85
- Specify ``false`` as the value of the ``directConnection`` parameter.
86
86
- Specify more than one host in the replica set.
87
87
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
+
88
98
The following examples show how to connect to a MongoDB replica set running on port
89
99
``27017`` of three different hosts by using either the ``ConnectionString`` or
90
100
``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
109
119
:end-before: end-connect-rs-settings
110
120
:dedent:
111
121
112
- .. note::
122
+ .. note:: Replica Set in Docker
113
123
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