Fixed client not reconnecting when server dies bug.

This commit is contained in:
crs 2002-12-15 19:58:41 +00:00
parent eda93fc20d
commit 773fcae8b3
1 changed files with 10 additions and 2 deletions

View File

@ -207,8 +207,15 @@ CMSWindowsScreen::mainLoop()
// handle quit message
if (event.m_msg.message == WM_QUIT) {
if (event.m_msg.wParam == 0) {
// force termination
CThread::getCurrentThread().cancel();
}
else {
// just exit the main loop
break;
}
}
// dispatch message
if (!onPreDispatch(&event)) {
@ -221,7 +228,8 @@ CMSWindowsScreen::mainLoop()
void
CMSWindowsScreen::exitMainLoop()
{
PostThreadMessage(m_threadID, WM_QUIT, 0, 0);
// close down cleanly
PostThreadMessage(m_threadID, WM_QUIT, 1, 0);
}
void