Please sign in to comment.
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...