diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-08 13:10:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-08 13:10:54 +0100 |
commit | 24d8134ac135cbbd1f49b8cefacad431ed8f9d71 (patch) | |
tree | 5d9efbfaa9e33692456470051eb1bfc2833c6761 /synapse/storage/engines | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into mysql (diff) | |
download | synapse-24d8134ac135cbbd1f49b8cefacad431ed8f9d71.tar.xz |
Fix maria engine to correctly recognize deadlocks
Diffstat (limited to 'synapse/storage/engines')
-rw-r--r-- | synapse/storage/engines/maria.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/engines/maria.py b/synapse/storage/engines/maria.py index a279bfaf44..230b32858c 100644 --- a/synapse/storage/engines/maria.py +++ b/synapse/storage/engines/maria.py @@ -42,6 +42,6 @@ class MariaEngine(object): prepare_database(db_conn, self) def is_deadlock(self, error): - if isinstance(error, self.module.InternalError): - return error.sqlstate == 40001 and error.errno == 1213 + if isinstance(error, self.module.DatabaseError): + return error.sqlstate == "40001" and error.errno == 1213 return False |