Commit f399d3f
committed
fix: iterate all servers in closeCheckedOutConnections()
The method had a premature 'return' inside the for loop, which caused it
to only close connections on the first server and exit immediately. This
fix removes the return statement so all servers have their checked-out
connections closed when MongoClient.close() is called.
This bug would affect multi-server topologies (replica sets, sharded
clusters) where only the first server's connections would be properly
closed.1 parent 2b2366d commit f399d3f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
| 498 | + | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| |||
0 commit comments