Commit cbe71f9
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 1cf791f commit cbe71f9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| |||
0 commit comments