From 2387627794bb0b26480c08c1eae2b155eefb62d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E6=B5=A9?= Date: Thu, 11 Apr 2024 14:24:50 +0800 Subject: [PATCH] support new error msg --- mysql_server_has_gone_away/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql_server_has_gone_away/base.py b/mysql_server_has_gone_away/base.py index 66b3a46..00c402c 100644 --- a/mysql_server_has_gone_away/base.py +++ b/mysql_server_has_gone_away/base.py @@ -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()