This repository has been archived by the owner on Jun 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connection is not closed prematurely until a query is complete
Closing a connection explicitly would close the connection immediately rather than wait until ongoing operations were complete on that connection. The close operation now waits until all other operations are finished. Since there are legitimate times to forcibly close the connection immediately, a new (optional) flag has been added to the close call: conn.close( immediately, callback ) If the immediately parameter is supplied and is true, then the connection will be closed rather than waiting for pending operations/queries. Note: if immediately is supplied but is not a boolean, then an error is thrown. close can still be called with either nothing or a callback as before. Tests added to verify the new parameter. Fixes #32
- Loading branch information
Showing
2 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters