Skip to content

Commit 9c5cd8d

Browse files
author
Sandro Santilli
committed
Remove disconnected clients from the pool
Might fix #458 Fixes CartoDB/CartoDB-SQL-API#135
1 parent 51a28c2 commit 9c5cd8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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 connection from pool on disconnect
37+
client.on('end', function(e) {
38+
pool.destroy(client);
39+
});
40+
3641
return cb(null, client);
3742
});
3843
},

0 commit comments

Comments
 (0)