Some corrects to code (not necessary)...
You have:
Code:
DWORD WINAPI ReloadThread(LPVOID pData)
{
...
while (true)
{
if (EnableList == true)
{
Sleep((DWORD)ReloadListDelay);
Auth.CServerListReload();
}
if (EnableIP == true)
{
Sleep((DWORD)ReloadBlockedIPDelay);
Auth.CIPReloadForbiddenIP();
}
}
...
}
You start one thread. And sleep time for both functions are summed.
If ReloadListDelay=10, and ReloadBlockedIPDelay=60, next delay for Auth.CServerListReload() be ~70. =)
Do two threads for real delays.