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