Skip to content

Commit

Permalink
drop references to _obj in __aexit__
Browse files Browse the repository at this point in the history
  • Loading branch information
jettify committed Dec 20, 2015
1 parent ad01251 commit d484a1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aioodbc/utils.py
Expand Up @@ -47,12 +47,14 @@ async def __aenter__(self):

async def __aexit__(self, exc_type, exc, tb):
await self._obj.close()
self._obj = None


class _PoolContextManager(_ContextManager):
async def __aexit__(self, exc_type, exc, tb):
self._obj.close()
await self._obj.wait_closed()
self._obj = None


class _PoolConnectionContextManager:
Expand Down

0 comments on commit d484a1e

Please sign in to comment.