Permalink
Browse files

Merge pull request #44 from nsabovic/overload

If the whole connection pool is busy, return error.
  • Loading branch information...
2 parents f13990f + 83af088 commit 53ca3a6b7558871b5143301e06998a22ac023aa9 @3rd-Eden committed Apr 20, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/connection.js
View
@@ -132,10 +132,7 @@ Manager.allocate = function allocate (callback) {
return this.connections.push(this.factory.apply(this, arguments));
}
- // wait untill the next event loop tick, to try again
- process.nextTick(function next () {
- Manager.allocate(callback);
- });
+ callback(new Error("All the connections in the memcached pool are busy"));
};
Manager.isAvailable = function isAvailable (connection) {

0 comments on commit 53ca3a6

Please sign in to comment.