View Single Post
Old 12.04.2007, 15:58   #14
Dmytro
Архивный участник
 
Join Date: Nov 2005
Posts: 215
Default

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.
Dmytro is offline