Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:coopernurse/node-pool

  • Loading branch information...
commit 29b401655e01636b419ba5be88e616e35802f20f 2 parents 1058949 + 7cb7505
@coopernurse authored
Showing with 6 additions and 2 deletions.
  1. +4 −1 lib/generic-pool.js
  2. +2 −1  package.json
View
5 lib/generic-pool.js
@@ -96,6 +96,7 @@ exports.Pool = function (factory) {
waitingClients = new PriorityQueue(factory.priorityRange || 1),
count = 0,
removeIdleScheduled = false,
+ removeIdleTimer = null,
draining = false,
// Prepare a logger function.
@@ -176,7 +177,7 @@ exports.Pool = function (factory) {
function scheduleRemoveIdle() {
if (!removeIdleScheduled) {
removeIdleScheduled = true;
- setTimeout(removeIdle, reapInterval);
+ removeIdleTimer = setTimeout(removeIdle, reapInterval);
}
}
@@ -343,6 +344,8 @@ exports.Pool = function (factory) {
me.destroy(obj.obj);
obj = willDie.shift();
}
+ removeIdleScheduled = false;
+ clearTimeout(removeIdleTimer);
if (callback) {
callback();
}
View
3  package.json
@@ -7,7 +7,8 @@
{ "name": "James Cooper", "email": "james@bitmechanic.com" },
{ "name": "Peter Galiba", "email": "poetro@poetro.hu", "url": "http://poetro.hu/" },
{ "name": "Gary Dusbabek" },
- { "name": "Tom MacWright", "url" : "http://www.developmentseed.org/" }
+ { "name": "Tom MacWright", "url" : "http://www.developmentseed.org/" },
+ { "name": "Douglas Christopher Wilson", "email": "doug@somethingdoug.com", "url" : "http://somethingdoug.com/" }
],
"keywords": ["pool", "pooling", "throttle"],
"main": "lib/generic-pool.js",
Please sign in to comment.
Something went wrong with that request. Please try again.