mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-21 23:13:08 +08:00
Fix #266: CloseHandle close an invalid handle
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user