Permalink
Browse files

Merge pull request #52 from windyrobin/master

fix bug of infinite wait when create object aync error
  • Loading branch information...
2 parents 2b5cea5 + 27bd81c commit 8bc7cb977b664b7d07abb60f0f5ed6737a84e702 @coopernurse committed Oct 23, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/generic-pool.js
View
@@ -255,8 +255,10 @@ exports.Pool = function (factory) {
}
if (err) {
count -= 1;
- dispense();
clientCb(err, obj);
+ process.nextTick(function(){
+ dispense();
+ });
} else {
if (clientCb) {
clientCb(err, obj);

0 comments on commit 8bc7cb9

Please sign in to comment.