Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix "Connection is closed" error when using browser authenticati…
…on (#257) The purpose of this PR is to solve the issue reported [here](#225). ## Root cause: There was one usage of `engine.connect` outside of a context manager (in `create_engine`), causing the connector to leave one connection "lying around". I did not dive too deep into the internals of the connector nor focused too much in understanding why is it different for the browser authentication mechanism, but mostly in ensuring all calls to `engine.connect()` were done within a context manager, ensuring SQL alchemy does its job in closing all connections when they should be closed. ## Implementation details: - Use a context manager when checking if the database exists (in the `create_engine` ) method.
- Loading branch information