--- qsampler/trunk/src/qsamplerMainForm.ui.h 2004/06/12 07:46:02 121 +++ qsampler/trunk/src/qsamplerMainForm.ui.h 2004/06/12 13:21:35 122 @@ -1462,12 +1462,16 @@ // And try to stop server. if (m_pServer) { appendMessages(tr("Server is stopping...")); - if (m_pServer->isRunning()) { + if (m_pServer->isRunning()) m_pServer->tryTerminate(); - return; - } } + // Give it some time to terminate gracefully and stabilize... + QTime t; + t.start(); + while (t.elapsed() < QSAMPLER_TIMER_MSECS) + QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + // Do final processing anyway. processServerExit(); }