diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-01 10:24:24 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-01 10:24:24 +0100 |
commit | fabb7acd459dc67990c5becae63e71f631399a5e (patch) | |
tree | 3b258476e5561ea1e6fdacbc0daa08c39a9fa5f5 /synapse/storage/engines | |
parent | Split a storage function in two so that we don't have to do extra work. (diff) | |
download | synapse-fabb7acd459dc67990c5becae63e71f631399a5e.tar.xz |
Fix bug where we reconnected to the database on every query.
Diffstat (limited to 'synapse/storage/engines')
-rw-r--r-- | synapse/storage/engines/postgres.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py index 7125f66f01..64e34265f6 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -53,7 +53,7 @@ class PostgresEngine(object): return False def is_connection_closed(self, conn): - return bool(conn) + return bool(conn.closed) def lock_table(self, txn, table): txn.execute("LOCK TABLE %s in EXCLUSIVE MODE" % (table,)) |