libibverbs/comp_mgr: fix hang during destruction
[mirror/winof/.git] / etc / user / comp_channel.cpp
index 14849bd..ca3356e 100644 (file)
@@ -102,8 +102,12 @@ err1:
 \r
 void CompManagerClose(COMP_MANAGER *pMgr)\r
 {\r
+       COMP_CHANNEL *channel;\r
+       COMP_ENTRY entry;\r
+\r
        pMgr->Run = FALSE;\r
-       CompManagerCancel(pMgr);\r
+       CompEntryInit(NULL, &entry);\r
+       PostQueuedCompletionStatus(pMgr->CompQueue, 0, (ULONG_PTR) pMgr, &entry.Overlap);\r
        WaitForSingleObject(pMgr->Thread, INFINITE);\r
        CloseHandle(pMgr->Thread);\r
 \r