Improve client stability by handling exceptions

This commit is contained in:
yuanyuanxiang
2025-07-16 02:37:33 +08:00
parent 89c6e5014f
commit 965bb64864
23 changed files with 178 additions and 43 deletions

View File

@@ -36,7 +36,7 @@ BOOL IOCPUDPClient::ConnectServer(const char* szServerIP, unsigned short uPort)
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̣߳<DFB3><CCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>
if (m_hWorkThread == NULL) {
#ifdef _WIN32
m_hWorkThread = (HANDLE)CreateThread(NULL, 0, WorkThreadProc, (LPVOID)this, 0, NULL);
m_hWorkThread = (HANDLE)__CreateThread(NULL, 0, WorkThreadProc, (LPVOID)this, 0, NULL);
m_bWorkThread = m_hWorkThread ? S_RUN : S_STOP;
#else
pthread_t id = 0;