fix bug related to sleeping and Windows networking
svn: r14053
This commit is contained in:
parent
63af81bd85
commit
d647999705
|
@ -303,7 +303,8 @@ void MrEdDispatchEvent(MSG *msg)
|
|||
LeaveEvent *e;
|
||||
e = (LeaveEvent *)GET_SAFEREF(sr);
|
||||
FREE_SAFEREF(sr);
|
||||
wxDoLeaveEvent(e->wnd, e->x, e->y, e->flags);
|
||||
if (e)
|
||||
wxDoLeaveEvent(e->wnd, e->x, e->y, e->flags);
|
||||
} else if (!wxTheApp->ProcessMessage(msg)) {
|
||||
#if wxLOG_EVENTS
|
||||
if (!log)
|
||||
|
@ -983,7 +984,10 @@ void MrEdMSWSleep(float secs, void *fds)
|
|||
}
|
||||
|
||||
if (th2) {
|
||||
closesocket(fake);
|
||||
while (closesocket(fake)) {
|
||||
if (WSAGetLastError() != WSAEINPROGRESS)
|
||||
break;
|
||||
}
|
||||
WaitForSingleObject(th2, INFINITE);
|
||||
scheme_forget_thread(thread_memory);
|
||||
CloseHandle(th2);
|
||||
|
|
|
@ -8102,7 +8102,11 @@ static void default_sleep(float v, void *fds)
|
|||
}
|
||||
clean_up_wait(result, array, rps, count);
|
||||
|
||||
closesocket(fake); /* cause selector thread to end */
|
||||
/* cause selector thread to end: */
|
||||
while (closesocket(fake)) {
|
||||
if (WSAGetLastError() != WSAEINPROGRESS)
|
||||
break;
|
||||
}
|
||||
|
||||
WaitForSingleObject(th, INFINITE);
|
||||
scheme_forget_thread(thread_memory);
|
||||
|
|
Loading…
Reference in New Issue
Block a user