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.
Hi,
Seems like there is any issue where connetions aren't properly closed when the rollback throws an exception.
aioodbc/aioodbc/connection.py
Lines 250 to 252 in 62069a2
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.