Skip to content

Commit b9bccea

Browse files
authored
DOCSP-40094: Clarify MongoClient.close() behavior (#898)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2
1 parent cae814d commit b9bccea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/faq.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ during a load spike than it is to complete every operation.
102102
When ``MongoClient.close()`` is called by any request, the driver
103103
closes all idle sockets and closes all sockets that are in
104104
use as they are returned to the pool. Calling ``MongoClient.close()``
105-
closes only inactive sockets, so you cannot interrupt or terminate
106-
any ongoing operations by using this method. The driver closes these
107-
sockets only when the process completes.
105+
closes only inactive sockets and does not directly terminate
106+
any ongoing operations. The driver closes any in-use sockets only when
107+
the associated operations complete. However, the ``MongoClient.close()``
108+
method does close existing sessions and transactions, which might indirectly
109+
affect the behavior of ongoing operations and open cursors.
108110

109111
What Is the Difference Between "connectTimeoutMS", "socketTimeoutMS" and "maxTimeMS"?
110112
-------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)