Skip to content

Commit

Permalink
Remove disconnected clients from the pool
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli committed Mar 17, 2014
1 parent 51a28c2 commit 9c5cd8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ var pools = {
pool.destroy(client);
});

// Remove connection from pool on disconnect
client.on('end', function(e) {
pool.destroy(client);
});

return cb(null, client);
});
},
Expand Down

0 comments on commit 9c5cd8d

Please sign in to comment.