Skip to content

Commit cb4938a

Browse files
committed
Stop WebServer before JSON API to avoid blocking calls by UI
1 parent f9b8e7c commit cb4938a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/hyperiond/hyperiond.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,6 @@ void HyperionDaemon::stopNetworkServices()
342342
}
343343
#endif
344344

345-
if (_jsonServerThread->isRunning()) {
346-
_jsonServerThread->quit();
347-
_jsonServerThread->wait();
348-
}
349-
_jsonServer.reset(nullptr);
350-
351345
if (_webServerThread->isRunning()) {
352346
_webServerThread->quit();
353347
_webServerThread->wait();
@@ -359,6 +353,12 @@ void HyperionDaemon::stopNetworkServices()
359353
_sslWebServerThread->wait();
360354
}
361355

356+
if (_jsonServerThread->isRunning()) {
357+
_jsonServerThread->quit();
358+
_jsonServerThread->wait();
359+
}
360+
_jsonServer.reset(nullptr);
361+
362362
QMetaObject::invokeMethod(_ssdpHandler.get(), &SSDPHandler::stop, Qt::QueuedConnection);
363363
if (_ssdpHandlerThread->isRunning()) {
364364
_ssdpHandlerThread->quit();

0 commit comments

Comments
 (0)