Skip to content

Commit 970365a

Browse files
committed
GUI - clean up server sync logic on boot
1 parent 7445123 commit 970365a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

app/gui/qt/mainwindow.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ MainWindow::MainWindow(QApplication &app, bool i18n, QSplashScreen* splash)
441441

442442
connect(&app, SIGNAL( aboutToQuit() ), this, SLOT( onExitCleanup() ) );
443443

444-
waitForServiceSync();
444+
445445

446446
initPrefsWindow();
447447

@@ -462,6 +462,10 @@ MainWindow::MainWindow(QApplication &app, bool i18n, QSplashScreen* splash)
462462

463463
focusMode = false;
464464

465+
// Wait to hear back from the server before continuing
466+
waitForServiceSync();
467+
serverStarted();
468+
465469
updateDarkMode();
466470
initDocsWindow();
467471
updateFullScreenMode();
@@ -736,12 +740,8 @@ void MainWindow::waitForServiceSync() {
736740
}
737741
}
738742
if (!sonicPiServer->isServerStarted()) {
739-
740-
if (!startup_error_reported) {
741743
std::cout << "[GUI] - critical error!" << std::endl;
742744
invokeStartupError("Critical server error!");
743-
}
744-
return;
745745
}
746746

747747
std::cout << "[GUI] - server connection established" << std::endl;

app/gui/qt/oschandler.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ void OscHandler::oscMessage(std::vector<char> buffer){
168168
else if (msg->match("/ack")) {
169169
std::string id;
170170
if (msg->arg().popStr(id).isOkNoMoreArgs()) {
171-
if(!server_started) {
172-
QMetaObject::invokeMethod(window, "serverStarted", Qt::QueuedConnection);
173-
}
174171
server_started = true;
175172

176173
} else

0 commit comments

Comments
 (0)