We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990b2af commit b0b5c61Copy full SHA for b0b5c61
CHANGES.md
@@ -2,6 +2,10 @@
2
3
## [Unreleased]
4
5
+### Fixed
6
+
7
+- Close readpool only if it exists ([#331](https://github.com/stac-utils/stac-fastapi-pgstac/pull/331))
8
9
## [6.1.2] - 2025-11-24
10
11
### Changed
stac_fastapi/pgstac/db.py
@@ -83,7 +83,8 @@ async def connect_to_db(
83
84
async def close_db_connection(app: FastAPI) -> None:
85
"""Close connection."""
86
- await app.state.readpool.close()
+ if pool := getattr(app.state, "readpool", None):
87
+ await pool.close()
88
if pool := getattr(app.state, "writepool", None):
89
await pool.close()
90
0 commit comments