From: Andreas R. <and...@us...> - 2003-05-28 22:37:35
|
Update of /cvsroot/squeak/squeak/platforms/win32/plugins/SocketPlugin In directory sc8-pr-cvs1:/tmp/cvs-serv23439 Modified Files: sqWin32NewNet.c Log Message: Fixed thread handle leak Index: sqWin32NewNet.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sqWin32NewNet.c 26 May 2002 18:58:20 -0000 1.4 --- sqWin32NewNet.c 28 May 2003 22:37:31 -0000 1.5 *************** *** 163,169 **** --- 163,171 ---- DWORD readWatcherOp; /* read operation to watch */ HANDLE hReadWatcherEvent; /* event for waking up read watcher */ + HANDLE hReadThread; DWORD writeWatcherOp; /* write operation to watch */ HANDLE hWriteWatcherEvent; /* event for waking up write watcher */ + HANDLE hWriteThread; volatile DWORD closePending; /* Cleanup counter */ *************** *** 268,271 **** --- 270,275 ---- CloseHandle(pss->hReadWatcherEvent); CloseHandle(pss->hWriteWatcherEvent); + CloseHandle(pss->hReadThread); + CloseHandle(pss->hWriteThread); /* Cleanup any accepted sockets */ *************** *** 665,668 **** --- 669,673 ---- CREATE_SUSPENDED, /* creation parameter -- create suspended so we can check the return value */ &id); /* return value for thread id */ + pss->hReadThread = hThread; if(!hThread) { printLastError(TEXT("CreateThread() failed")); *************** *** 686,689 **** --- 691,695 ---- CREATE_SUSPENDED, /* creation parameter -- create suspended so we can check the return value */ &id); /* return value for thread id */ + pss->hWriteThread = hThread; if(!hThread) { printLastError(TEXT("CreateThread() failed")); |