Skip to content

Connection not closed on rollback error #471

Description

@highviolet

Hi,

Seems like there is any issue where connetions aren't properly closed when the rollback throws an exception.

async def _disconnect_on_error(c: "Connection") -> None:
await c.rollback()
await c.close()

An example is when the original query throws:
[08S01] [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by the remote host.

Then the rollback will also fail with the same exception and the connection won't be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions