Skip to content

Commit caeba4f

Browse files
committed
Do not leak db connection on early exit
1 parent 616fe83 commit caeba4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backend/infrahub/cli/upgrade.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ async def upgrade_cmd(
8383

8484
migrations = await detect_migration_to_run(current_graph_version=root_node.graph_version)
8585
if check:
86+
await dbdriver.close()
8687
return
8788

8889
if not await migrate_database(db=dbdriver, initialize=False, migrations=migrations):

0 commit comments

Comments
 (0)