Use a timer to check the trail status
This commit is contained in:
@@ -489,12 +489,13 @@ DWORD WINAPI StartClient(LPVOID lParam)
|
||||
for (int k = 500; app.m_bIsRunning(&app) && --k; Sleep(10));
|
||||
continue;
|
||||
}
|
||||
SAFE_DELETE(Manager);
|
||||
Manager = new CKernelManager(&settings, ClientObject, app.g_hInstance);
|
||||
|
||||
//<><D7BC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
LOGIN_INFOR login = GetLoginInfo(GetTickCount64() - dwTickCount, settings.ClientType());
|
||||
ClientObject->SendLoginInfo(login);
|
||||
|
||||
SAFE_DELETE(Manager);
|
||||
Manager = new CKernelManager(&settings, ClientObject, app.g_hInstance);
|
||||
do
|
||||
{
|
||||
Manager->SendHeartbeat();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#endif
|
||||
|
||||
#define UM_ICONNOTIFY WM_USER+100
|
||||
|
||||
#define TIMER_CHECK 1
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -512,6 +512,11 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
|
||||
lvColumn.pszText = (char*)str.data();
|
||||
m_CList_Online.SetColumn(ONLINELIST_VIDEO, &lvColumn);
|
||||
timeBeginPeriod(1);
|
||||
#ifdef _DEBUG
|
||||
SetTimer(TIMER_CHECK, 60 * 1000, NULL);
|
||||
#else
|
||||
SetTimer(TIMER_CHECK, 600 * 1000, NULL);
|
||||
#endif
|
||||
|
||||
return TRUE; // <20><><EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TRUE
|
||||
}
|
||||
@@ -634,6 +639,14 @@ void CMy2015RemoteDlg::OnSize(UINT nType, int cx, int cy)
|
||||
|
||||
void CMy2015RemoteDlg::OnTimer(UINT_PTR nIDEvent)
|
||||
{
|
||||
if (nIDEvent == TIMER_CHECK)
|
||||
{
|
||||
if (!CheckValid())
|
||||
{
|
||||
KillTimer(nIDEvent);
|
||||
return OnMainExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user