Skip to content

Commit

Permalink
Fix a logic error in the connection pool.
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed Aug 26, 2010
1 parent 539149f commit 4641ab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/couch-client.js
Expand Up @@ -14,11 +14,11 @@ function CouchClient(url) {


function getServerFromPool() {
poolIndex = (poolIndex + 1) % POOL_SIZE;
if (!pool[poolIndex]) {
pool[poolIndex] = getServer();
}
return pool[poolIndex];
poolIndex = (poolIndex + 1) % POOL_SIZE;
}

function getServer() {
Expand Down

0 comments on commit 4641ab0

Please sign in to comment.