Skip to content

Commit c5cd9e2

Browse files
author
Thomas Reggi
committed
add mongos
1 parent e0e11bb commit c5cd9e2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/core/sdam/topology_description.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,19 @@ class TopologyDescription {
151151
// update the actual server description
152152
serverDescriptions.set(address, serverDescription);
153153

154+
if (serverType === ServerType.Mongos) {
155+
return new TopologyDescription(
156+
TopologyType.Sharded,
157+
serverDescriptions,
158+
setName,
159+
maxSetVersion,
160+
maxElectionId,
161+
commonWireVersion,
162+
this.options
163+
);
164+
}
165+
154166
if (topologyType === TopologyType.Single) {
155-
// once we are defined as single, that never changes
156167
return new TopologyDescription(
157168
TopologyType.Single,
158169
serverDescriptions,

0 commit comments

Comments
 (0)