Sebastian Lackner : ws2_32/tests: Wait for thread termination before cleaning up winsock.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 20 09:54:15 CST 2014


Module: wine
Branch: master
Commit: 69cc90957c2118fc503ea9e18e7b2a14243c7685
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=69cc90957c2118fc503ea9e18e7b2a14243c7685

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Thu Nov 20 12:51:06 2014 +0100

ws2_32/tests: Wait for thread termination before cleaning up winsock.

---

 dlls/ws2_32/tests/sock.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 0c39545..acc2783 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -4354,7 +4354,11 @@ end:
     if (dst != INVALID_SOCKET)
         closesocket(dst);
     if (hThread != NULL)
+    {
+        dwRet = WaitForSingleObject(hThread, 500);
+        ok(dwRet == WAIT_OBJECT_0, "failed to wait for thread termination: %d\n", GetLastError());
         CloseHandle(hThread);
+    }
     if (ov.hEvent)
         CloseHandle(ov.hEvent);
     HeapFree(GetProcessHeap(), 0, buffer);




More information about the wine-cvs mailing list