mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
fix restart of hyperion. now devices closed before restart (#269)
This commit is contained in:
@@ -594,7 +594,7 @@ Hyperion::Hyperion(const Json::Value &jsonConfig, const QJsonObject &qjsonConfig
|
||||
}
|
||||
|
||||
|
||||
Hyperion::~Hyperion()
|
||||
void Hyperion::freeObjects()
|
||||
{
|
||||
// switch off all leds
|
||||
clearall();
|
||||
@@ -608,6 +608,11 @@ Hyperion::~Hyperion()
|
||||
delete _messageForwarder;
|
||||
}
|
||||
|
||||
Hyperion::~Hyperion()
|
||||
{
|
||||
freeObjects();
|
||||
}
|
||||
|
||||
unsigned Hyperion::getLedCount() const
|
||||
{
|
||||
return _ledString.leds().size();
|
||||
|
@@ -903,6 +903,7 @@ void JsonClientConnection::handleConfigCommand(const QJsonObject& message, const
|
||||
}
|
||||
else if (subcommand == "reload")
|
||||
{
|
||||
_hyperion->freeObjects();
|
||||
Process::restartHyperion();
|
||||
sendErrorReply("failed to restart hyperion", full_command, tan);
|
||||
}
|
||||
|
Reference in New Issue
Block a user