Fix refresh method
This commit is contained in:
parent
4c8ca076b7
commit
04d1b82685
@ -114,7 +114,6 @@ void IntegrationPluginFronius::setupThing(ThingSetupInfo *info)
|
|||||||
|
|
||||||
// Verify the version
|
// Verify the version
|
||||||
FroniusNetworkReply *reply = connection->getVersion();
|
FroniusNetworkReply *reply = connection->getVersion();
|
||||||
connect(reply, &FroniusNetworkReply::finished, reply, &QNetworkReply::deleteLater);
|
|
||||||
connect(reply, &FroniusNetworkReply::finished, info, [=] {
|
connect(reply, &FroniusNetworkReply::finished, info, [=] {
|
||||||
QByteArray data = reply->networkReply()->readAll();
|
QByteArray data = reply->networkReply()->readAll();
|
||||||
if (reply->networkReply()->error() != QNetworkReply::NoError) {
|
if (reply->networkReply()->error() != QNetworkReply::NoError) {
|
||||||
@ -236,7 +235,7 @@ void IntegrationPluginFronius::executeAction(ThingActionInfo *info)
|
|||||||
|
|
||||||
void IntegrationPluginFronius::refreshConnection(FroniusSolarConnection *connection)
|
void IntegrationPluginFronius::refreshConnection(FroniusSolarConnection *connection)
|
||||||
{
|
{
|
||||||
if (!connection->busy()) {
|
if (connection->busy()) {
|
||||||
qCWarning(dcFronius()) << "Connection busy. Skipping refresh cycle for host" << connection->address().toString();
|
qCWarning(dcFronius()) << "Connection busy. Skipping refresh cycle for host" << connection->address().toString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user