Permalink
Browse files

db; always force close the connection

  • Loading branch information...
1 parent 8150420 commit d80cc30d4fef62992e8fd5e9d21480ec0bf6e795 @aheckmann committed Jan 29, 2013
Showing with 6 additions and 7 deletions.
  1. +6 −7 lib/db.js
View
@@ -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);
}
/**

0 comments on commit d80cc30

Please sign in to comment.