mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-15 17:50:36 +00:00
The database engine's `is_connection_closed` and `in_transaction` checks (used by the transaction driver before reusing a pooled connection) need to read these off the raw connection, as they do from psycopg2's `conn.closed` / `conn.status`. Add the two accessors to the shim: `is_closed()` is true once the connection is closed/returned/discarded or the socket is torn down, and `in_transaction()` reports the tracked transaction flag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3G4M92AmwSSZCbmtMJU3d