From 7322850427b5929f77124c1b6202d408938ea12d Mon Sep 17 00:00:00 2001 From: jenz Date: Sun, 18 Jun 2023 23:55:34 +0200 Subject: [PATCH] removed some db reconnections as might be cause of handles issue --- RaceTimer/scripting/unloze_racetimer_redux.sp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/RaceTimer/scripting/unloze_racetimer_redux.sp b/RaceTimer/scripting/unloze_racetimer_redux.sp index 97ab1063..f2287ef5 100755 --- a/RaceTimer/scripting/unloze_racetimer_redux.sp +++ b/RaceTimer/scripting/unloze_racetimer_redux.sp @@ -104,11 +104,7 @@ public Action allow_leaving_again(Handle hTimer, int Serial) } public Action Timer_alter_tables(Handle hTimer) { - if (!g_dDatabase) - { - Database.Connect(SQL_OnDatabaseConnect, "racetimercss"); - } - else + if (g_dDatabase) { startTimer(); } @@ -320,9 +316,7 @@ public void RemoveBinarySearchIndex() public void OnMapEnd() { - if (!g_dDatabase) - Database.Connect(SQL_OnDatabaseConnect, "racetimercss"); - else + if (g_dDatabase) RemoveBinarySearchIndex(); } @@ -937,7 +931,6 @@ public void insertPlayerMYSQL(int client) char[] sEscapedName = new char[size2 + 1]; if (!g_dDatabase) { - Database.Connect(SQL_OnDatabaseConnect, "racetimercss"); return; } g_dDatabase.Escape(sName, sEscapedName, size2 + 1); @@ -983,7 +976,6 @@ public void insert_client_ignoring_racetimer(int client) GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID)); if (!g_dDatabase) { - Database.Connect(SQL_OnDatabaseConnect, "racetimercss"); return; } if (StrEqual(sSID, "STEAM_ID_STOP_IGNORING_RETVALS") || StrEqual(sSID, "STEAM_ID_PENDING"))