Created
May 20, 2011 20:19
-
-
Save springmeyer/983713 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/generic-pool.js b/lib/generic-pool.js | |
index e98d9ca..5808d1b 100644 | |
--- a/lib/generic-pool.js | |
+++ b/lib/generic-pool.js | |
@@ -242,10 +242,10 @@ exports.Pool = function (factory) { | |
*/ | |
me.release = function (obj) { | |
//log("return to pool"); | |
+ dispense(); | |
var objWithTimeout = { obj: obj, timeout: (new Date().getTime() + idleTimeoutMillis) }; | |
availableObjects.push(objWithTimeout); | |
log("timeout: " + objWithTimeout.timeout); | |
- dispense(); | |
scheduleRemoveIdle(); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment