mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user