Skip to content

Commit 8d9c290

Browse files
committed
refactor: support modern connectTimeoutMS option name
1 parent 8a39c1d commit 8d9c290

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/core/sdam/monitor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ class Monitor extends EventEmitter {
4848
this.address = server.description.address;
4949
this.options = Object.freeze({
5050
connectTimeoutMS:
51-
typeof options.connectionTimeout === 'number' ? options.connectionTimeout : 10000,
51+
typeof options.connectionTimeout === 'number'
52+
? options.connectionTimeout
53+
: typeof options.connectTimeoutMS === 'number'
54+
? options.connectTimeoutMS
55+
: 10000,
5256
heartbeatFrequencyMS:
5357
typeof options.heartbeatFrequencyMS === 'number' ? options.heartbeatFrequencyMS : 10000,
5458
minHeartbeatFrequencyMS:

0 commit comments

Comments
 (0)