Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
db; always force close the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Jan 29, 2013
1 parent 8150420 commit d80cc30
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,16 @@ function createConstructor (db) {

/**
* Close this database connection
*
* @param {Function} [cb]
*/

DB.prototype.close = function (force, cb) {
var args = slice(arguments);
var last = args[args.length];

if ('function' != typeof last) {
args.push(handleError);
DB.prototype.close = function (cb) {
if ('function' != typeof cb) {
cb = handleError;
}

db.close.apply(db, args);
db.close.call(db, true, cb);
}

/**
Expand Down

0 comments on commit d80cc30

Please sign in to comment.