Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
support new error msg
  • Loading branch information
程浩 committed Apr 11, 2024
1 parent 9e1d422 commit c699aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysql_server_has_gone_away/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def wrapper(self, query, args=None):
except (OperationalError, InterfaceError) as e:
logger.warn("MySQL server has gone away. Rerunning query: %s", query)
if (
'MySQL server has gone away' in str(e) or
'server has gone away' in str(e) or
'Lost connection to MySQL server during query' in str(e)
):
db_wrapper.connection.close()
Expand Down

0 comments on commit c699aa5

Please sign in to comment.