diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-15 10:23:42 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-15 10:23:42 +0100 |
commit | c756dfeb143d61410303dbd51e17303d0b08e7d4 (patch) | |
tree | 8c529f28b31d0f8a5759f6b5f263a95bd476cd3a /synapse/storage/engines | |
parent | Change port script to work with postgres (diff) | |
download | synapse-c756dfeb143d61410303dbd51e17303d0b08e7d4.tar.xz |
Correctly identify deadlocks
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 9910de5dc2..457c1f70a5 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -37,7 +37,7 @@ class PostgresEngine(object): def is_deadlock(self, error): if isinstance(error, self.module.DatabaseError): - return error.pgcode == "40P01" + return error.pgcode in ["40001", "40P01"] return False def load_unicode(self, v): |