now supports cleanup of connections after a timeout