Remove disconnected clients from the pool

Might fix #458
Fixes https://github.com/CartoDB/CartoDB-SQL-API/issues/135
This commit is contained in:
Sandro Santilli 2014-03-17 18:51:32 +01:00
parent 51a28c2265
commit 9c5cd8d02d

View File

@ -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);
});
},