mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 01:30:20 +00:00
Fix maria engine to correctly recognize deadlocks
This commit is contained in:
parent
d5e7e6b9b6
commit
24d8134ac1
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue