From fabb7acd459dc67990c5becae63e71f631399a5e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 1 May 2015 10:24:24 +0100 Subject: Fix bug where we reconnected to the database on every query. --- synapse/storage/engines/postgres.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synapse/storage/engines/postgres.py') 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,)) -- cgit 1.4.1