We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c008b2a commit 8514a46Copy full SHA for 8514a46
databases/backends/postgres.py
@@ -1,3 +1,4 @@
1
+import asyncio
2
import logging
3
import typing
4
from collections.abc import Mapping
@@ -65,7 +66,7 @@ async def connect(self) -> None:
65
66
67
async def disconnect(self) -> None:
68
assert self._pool is not None, "DatabaseBackend is not running"
- await self._pool.close()
69
+ await asyncio.wait_for(self._pool.close(), timeout=30)
70
self._pool = None
71
72
def connection(self) -> "PostgresConnection":
0 commit comments