Skip to content

Commit 8dc2416

Browse files
committed
fix(unified-topology): only clone pool size if provided
NODE-1928
1 parent 7ae37a2 commit 8dc2416

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/topologies/native_topology.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class NativeTopology extends Topology {
1414
{
1515
cursorFactory: Cursor,
1616
reconnect: false,
17-
emitError: options.emitError,
18-
size: options.poolSize,
19-
monitorCommands: options.monitorCommands
17+
emitError: typeof options.emitError === 'boolean' ? options.emitError : true,
18+
size: typeof options.poolSize === 'number' ? options.poolSize : 5,
19+
monitorCommands:
20+
typeof options.monitorCommands === 'boolean' ? options.monitorCommands : false
2021
}
2122
);
2223

0 commit comments

Comments
 (0)