Skip to content

Commit

Permalink
Remove client from pool on connection end
Browse files Browse the repository at this point in the history
Might fix brianc#458
Definitely fixes CartoDB/CartoDB-SQL-API#135
  • Loading branch information
Sandro Santilli committed Mar 14, 2014
1 parent 2716f95 commit fb491cf
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 client from pool on connection end
client.on('end', function() {
pool.destroy(client);
});

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

0 comments on commit fb491cf

Please sign in to comment.