Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix infinite loop if no callback provided. #8

Merged
merged 1 commit into from

2 participants

@demian85
Collaborator

Calling end() with no callback triggers an infinite loop...
Please check if the other methods work as expected, I really don't have time to test them all.

pd: your code is really a mess!

@Kijewski Kijewski merged commit 265662d into Kijewski:master
@Kijewski
Owner

pd: your code is really a mess!

I appreciate your bug reports, but please note that I lost my interest in nodejs for now.
Mysql-pool was my first encounter with nodejs, so you may be right.
If you can do it better, go for it, you're welcome! Otherwise enjoy the library in silence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 7, 2011
  1. @demian85
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/mysql-pool/pool.js
View
2  lib/mysql-pool/pool.js
@@ -74,7 +74,7 @@ MySQLPool.prototype._forEach = function _forEach(params) {
// TODO: callback _once_
var pool = this;
var args = Array.prototype.slice.call(params.args);
- while(typeof args[args.length-1] == "undefined") {
+ while(args.length && typeof args[args.length-1] == "undefined") {
args.pop();
}
var cb = args.pop();
Something went wrong with that request. Please try again.