Skip to content

Commit fb491cf

Browse files
author
Sandro Santilli
committed
Remove client from pool on connection end
Might fix brianc#458 Definitely fixes CartoDB/CartoDB-SQL-API#135
1 parent 2716f95 commit fb491cf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: lib/pool.js

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ var pools = {
3333
pool.destroy(client);
3434
});
3535

36+
// Remove client from pool on connection end
37+
client.on('end', function() {
38+
pool.destroy(client);
39+
});
40+
3641
return cb(null, client);
3742
});
3843
},

0 commit comments

Comments
 (0)