Home > Back-end >  A thread function inside, want to see the map elements of collection, why not go to the while (ite!=
A thread function inside, want to see the map elements of collection, why not go to the while (ite!=

Time:09-21

LPVOID unsigned __stdcall TCPKernel: : ThreadKeepAlive (void *)
{
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 meet

CodePudding 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 variable

CodePudding user response:

Strong solved already, alas, turn the int
  • Related