Skip to content

Commit

Permalink
support new error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
程浩 committed Apr 11, 2024
1 parent 9e1d422 commit 2387627
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mysql_server_has_gone_away/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def wrapper(self, query, args=None):
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 2387627

Please sign in to comment.