mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:45:22 +00:00
UI: RpcManager::sendCommandDataToClients: Set thread busy
This commit is contained in:
parent
04dd18d6f0
commit
b40baffe54
@ -175,7 +175,13 @@ bool ControlManager::processRequest(Control::Command command, const QVariantList
|
||||
OsUtil::setThreadIsBusy(true);
|
||||
|
||||
QString errorMessage;
|
||||
const bool success = processCommand({ w, command, args, errorMessage });
|
||||
const bool success = processCommand({
|
||||
.worker = w,
|
||||
.command = command,
|
||||
.args = args,
|
||||
.errorMessage = errorMessage,
|
||||
});
|
||||
|
||||
if (!success) {
|
||||
qCWarning(LC) << "Bad command" << errorMessage << ':' << command << args;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <rpc/statmanagerrpc.h>
|
||||
#include <rpc/taskmanagerrpc.h>
|
||||
#include <util/ioc/ioccontainer.h>
|
||||
#include <util/osutil.h>
|
||||
|
||||
namespace {
|
||||
|
||||
@ -35,6 +36,8 @@ inline bool sendCommandDataToClients(
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
OsUtil::setThreadIsBusy(true);
|
||||
|
||||
for (ControlWorker *w : clients) {
|
||||
if (!w->isServiceClient())
|
||||
continue;
|
||||
@ -45,6 +48,8 @@ inline bool sendCommandDataToClients(
|
||||
}
|
||||
}
|
||||
|
||||
OsUtil::setThreadIsBusy(false);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user