Fix #266: CloseHandle close an invalid handle

This commit is contained in:
yuanyuanxiang
2025-12-26 15:57:27 +01:00
parent 02d86f6ce7
commit 34e7cdb663
33 changed files with 171 additions and 161 deletions

View File

@@ -185,7 +185,7 @@ void IOCPKCPServer::Destroy()
if (m_hThread) {
WaitForSingleObject(m_hThread, INFINITE);
CloseHandle(m_hThread);
SAFE_CLOSE_HANDLE(m_hThread);
m_hThread = NULL;
}
@@ -193,7 +193,7 @@ void IOCPKCPServer::Destroy()
m_kcpUpdateThread.join();
if (m_hIOCP) {
CloseHandle(m_hIOCP);
SAFE_CLOSE_HANDLE(m_hIOCP);
m_hIOCP = NULL;
}