From 78067673b5fa03ea93678991ce37487bbb8e9a65 Mon Sep 17 00:00:00 2001 From: Lohikar Date: Fri, 6 Jan 2017 16:04:32 -0600 Subject: [PATCH] Disable attempt to re-run queries after reconnect (#1402) Reverts the automatic re-execution of queries after the db connection is reestablished, added in 36a084f. It was causing infinite recursion and generally breaking the server, dropping a single query on reconnect is still better than the old behavior of dropping all queries. --- code/defines/procs/dbcore.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/defines/procs/dbcore.dm b/code/defines/procs/dbcore.dm index 1ef5de1baf7..debf76f4066 100644 --- a/code/defines/procs/dbcore.dm +++ b/code/defines/procs/dbcore.dm @@ -131,10 +131,9 @@ DBQuery/proc/Execute(var/list/argument_list = null, var/pass_not_found = 0, sql_ error("SQL Error: '[error]'") // This is hacky and should probably be changed if (error == "MySQL server has gone away") - log_and_message_admins("is attempting to reconnect the server to MySQL. (Connection Failure)") - dbcon.Reconnect() - if (db_connection.IsConnected()) - src.Execute(argument_list) + log_game("MySQL connection drop detected, attempting to reconnect.") + message_admins("MySQL connection drop detected, attempting to reconnect.") + db_connection.Reconnect() return result