Fixed client not reconnecting when server dies bug.
This commit is contained in:
parent
eda93fc20d
commit
773fcae8b3
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue