diff options
author | dgp <dgp@users.sourceforge.net> | 2012-11-13 21:03:28 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-11-13 21:03:28 (GMT) |
commit | 5b2d20cdcbe08cf350f3adc4e83618cdd5720cf7 (patch) | |
tree | e03b318dbb0e29de111d837975f499df3be1a176 /win/tclWinSock.c | |
parent | fd53317415e2ad6115af604bbe52c4ef4f080dcb (diff) | |
parent | ba16c7a4403b1fa99daafb9292751bf572c09616 (diff) | |
download | tcl-5b2d20cdcbe08cf350f3adc4e83618cdd5720cf7.zip tcl-5b2d20cdcbe08cf350f3adc4e83618cdd5720cf7.tar.gz tcl-5b2d20cdcbe08cf350f3adc4e83618cdd5720cf7.tar.bz2 |
merge 8.4bug_3567063
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r-- | win/tclWinSock.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 328198b..050564d 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -659,12 +659,13 @@ TclpFinalizeSockets() if (tsdPtr != NULL) { if (tsdPtr->socketThread != NULL) { if (tsdPtr->hwnd != NULL) { - PostMessage(tsdPtr->hwnd, SOCKET_TERMINATE, 0, 0); - /* - * Wait for the thread to exit. This ensures that we are - * completely cleaned up before we leave this function. - */ - WaitForSingleObject(tsdPtr->readyEvent, INFINITE); + if (PostMessage(tsdPtr->hwnd, SOCKET_TERMINATE, 0, 0)) { + /* + * Wait for the thread to exit. This ensures that we are + * completely cleaned up before we leave this function. + */ + WaitForSingleObject(tsdPtr->readyEvent, INFINITE); + } tsdPtr->hwnd = NULL; } CloseHandle(tsdPtr->socketThread); |