From 4ec61accdc06cd11f3bfb334bbce024b155f4d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E6=B5=A9?= Date: Thu, 11 Apr 2024 14:27:43 +0800 Subject: [PATCH] Update base.py --- mysql_server_has_gone_away/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql_server_has_gone_away/base.py b/mysql_server_has_gone_away/base.py index 7162934..00c402c 100644 --- a/mysql_server_has_gone_away/base.py +++ b/mysql_server_has_gone_away/base.py @@ -17,7 +17,8 @@ def wrapper(self, query, args=None): except (OperationalError, InterfaceError) as e: logger.warn("MySQL server has gone away. Rerunning query: %s", query) if ( - 'server has gone away' in str(e) or + '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()