Skip to content

Commit

Permalink
Avoids throwing when calling db.close() without a callback and using …
Browse files Browse the repository at this point in the history
…pool in mysql (fixes #180)
  • Loading branch information
dresende committed May 31, 2013
1 parent 8764981 commit 145719f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Drivers/DML/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ Driver.prototype.reconnect = function (cb, connection) {

Driver.prototype.close = function (cb) {
if (this.opts.pool) {
return cb();
if (typeof cb == "function") cb();
return;
}
this.db.end(cb);
};
Expand Down

0 comments on commit 145719f

Please sign in to comment.