Skip to content

Commit a931816

Browse files
authored
Document that concurrently closing drivers is a bad idea. (#1269)
1 parent d6d78c0 commit a931816

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/core/src/driver.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@ class Driver {
281281
/**
282282
* Close all open sessions and other associated resources. You should
283283
* make sure to use this when you are done with this driver instance.
284+
*
285+
* This will interrupt any running connections.
286+
* Make sure you are done using the driver object and any resources
287+
* spawned from it (such as sessions or transactions) while calling
288+
* this method. Failing to do so will result in unspecified behavior.
289+
*
284290
* @public
285291
* @return {Promise<void>} promise resolved when the driver is closed.
286292
*/

0 commit comments

Comments
 (0)