1462 |
// And try to stop server. |
// And try to stop server. |
1463 |
if (m_pServer) { |
if (m_pServer) { |
1464 |
appendMessages(tr("Server is stopping...")); |
appendMessages(tr("Server is stopping...")); |
1465 |
if (m_pServer->isRunning()) { |
if (m_pServer->isRunning()) |
1466 |
m_pServer->tryTerminate(); |
m_pServer->tryTerminate(); |
|
return; |
|
|
} |
|
1467 |
} |
} |
1468 |
|
|
1469 |
|
// Give it some time to terminate gracefully and stabilize... |
1470 |
|
QTime t; |
1471 |
|
t.start(); |
1472 |
|
while (t.elapsed() < QSAMPLER_TIMER_MSECS) |
1473 |
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
1474 |
|
|
1475 |
// Do final processing anyway. |
// Do final processing anyway. |
1476 |
processServerExit(); |
processServerExit(); |
1477 |
} |
} |