{
LPVOID TCPKernel * pthis=(TCPKernel *);
Auto ite=pthis - & gt; M_mapKeepAlive. The begin ();
DWORD m_dSockTime;
While (pthis - & gt; M_bflag)
{
DWORD m_dCurrentTime=GetTickCount ();//get the current time
//compare
While (ite!=pthis - & gt; M_mapKeepAlive. End ())
{
If ((m_dCurrentTime ite - & gt; Second) & gt; 300000)
{
Closesocket (ite - & gt; First);
}
Ite++;
}
}
return 0;
}
CodePudding user response:
The flag does not meetCodePudding user response:
Suggest a breakpoint step through, can't get into that condition does not meet ah, what specific conditions when you debug step by step operation, observe the change of each variableCodePudding user response:
Strong solved already, alas, turn the int