Fix 'Restart' RPC command (#894)

This commit is contained in:
Murat Seker
2020-07-22 18:15:39 +02:00
committed by GitHub
parent 30f04a326b
commit df0d411ba1
6 changed files with 61 additions and 26 deletions

View File

@@ -868,12 +868,16 @@ void JsonAPI::handleConfigCommand(const QJsonObject &message, const QString &com
{
if (_adminAuthorized)
{
_hyperion->freeObjects(true);
Debug(_log, "Restarting due to RPC command");
Process::restartHyperion();
sendErrorReply("failed to restart hyperion", full_command, tan);
sendSuccessReply(command + "-" + subcommand, tan);
}
else
{
sendErrorReply("No Authorization", command, tan);
}
}
else
{