Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Commit 032a7d7

Browse files
authored
fix: when isSrvRecord is true do not default directConnection to true in driver connection options (#339)
1 parent 07b21e5 commit 032a7d7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/connect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ const getTasks = (model, setupListeners) => {
218218
if (
219219
model.directConnection === undefined &&
220220
model.hosts.length === 1 &&
221+
!model.isSrvRecord &&
221222
(model.replicaSet === undefined || model.replicaSet === '')
222223
) {
223224
// Previous to the node driver 3.6.3, directConnection was

0 commit comments

Comments
 (0)