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.
This commit is contained in:
Lohikar
2017-01-07 00:04:32 +02:00
committed by skull132
parent 36a084fbbc
commit 78067673b5
+3 -4
View File
@@ -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