fix: Limit WaitForDialogOpen waiting time
This commit is contained in:
@@ -539,5 +539,6 @@ VOID IOCPClient::RunEventLoop(const BOOL &bCondition)
|
||||
Mprintf("======> RunEventLoop begin\n");
|
||||
while (m_bIsRunning && bCondition)
|
||||
Sleep(200);
|
||||
setManagerCallBack(NULL, NULL);
|
||||
Mprintf("======> RunEventLoop end\n");
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ int CManager::Send(LPBYTE lpData, UINT nSize)
|
||||
|
||||
VOID CManager::WaitForDialogOpen()
|
||||
{
|
||||
WaitForSingleObject(m_hEventDlgOpen, INFINITE);
|
||||
WaitForSingleObject(m_hEventDlgOpen, 8000);
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Sleep,<2C><>ΪԶ<CEAA>̴<EFBFBD><CCB4>ڴ<EFBFBD>InitDialog<6F>з<EFBFBD><D0B7><EFBFBD>COMMAND_NEXT<58><54><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>Ҫһ<D2AA><D2BB>ʱ<EFBFBD><CAB1>
|
||||
Sleep(150);
|
||||
}
|
||||
|
||||
@@ -79,9 +79,16 @@ typedef void* LPVOID, * HANDLE;
|
||||
#define GET_FILEPATH(dir,file) [](char*d,const char*f){char*p=d;while(*p)++p;while('\\'!=*p&&p!=d)--p;strcpy(p+1,f);return d;}(dir,file)
|
||||
#endif
|
||||
|
||||
inline int isValid() {
|
||||
inline int isValid_30s() {
|
||||
static time_t tm = time(nullptr);
|
||||
return time(nullptr) - tm <= 60;
|
||||
int span = int(time(nullptr) - tm);
|
||||
return span <= 30;
|
||||
}
|
||||
|
||||
inline int isValid_10s() {
|
||||
static time_t tm = time(nullptr);
|
||||
int span = int(time(nullptr) - tm);
|
||||
return span <= 10;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>仯ʱ<E4BBAF><CAB1>Ӧ<EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>Ա<EFBFBD><D4B1>Ա<EFBFBD><D4B1>س<EFBFBD><D8B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
Reference in New Issue
Block a user