Made clientprefs attempt to reconnect to the database on map change (bug 4745, r=dvander).
This commit is contained in:
parent
afe5425163
commit
997c7ebbcf
@ -202,6 +202,19 @@ void ClientPrefs::SDK_OnUnload()
|
|||||||
cookieMutex->DestroyThis();
|
cookieMutex->DestroyThis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientPrefs::OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax)
|
||||||
|
{
|
||||||
|
if (Database == NULL && !databaseLoading)
|
||||||
|
{
|
||||||
|
g_pSM->LogMessage(myself, "Attempting to reconnect to database...");
|
||||||
|
|
||||||
|
databaseLoading = true;
|
||||||
|
|
||||||
|
TQueryOp *op = new TQueryOp(Query_Connect, 0);
|
||||||
|
dbi->AddToThreadQueue(op, PrioQueue_High);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ClientPrefs::DatabaseConnect()
|
void ClientPrefs::DatabaseConnect()
|
||||||
{
|
{
|
||||||
char error[256];
|
char error[256];
|
||||||
|
@ -87,6 +87,8 @@ public:
|
|||||||
const char *GetExtensionVerString();
|
const char *GetExtensionVerString();
|
||||||
const char *GetExtensionDateString();
|
const char *GetExtensionDateString();
|
||||||
|
|
||||||
|
virtual void OnCoreMapStart(edict_t *pEdictList, int edictCount, int clientMax);
|
||||||
|
|
||||||
void DatabaseConnect();
|
void DatabaseConnect();
|
||||||
|
|
||||||
bool AddQueryToQueue(TQueryOp *query);
|
bool AddQueryToQueue(TQueryOp *query);
|
||||||
|
Loading…
Reference in New Issue
Block a user