fix a crash on removal

pull/53/head
Michael Zanetti 2022-04-06 13:43:56 +02:00
parent 5d20d4759f
commit b1de77c63d
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ void IntegrationPluginSchrack::postSetupThing(Thing *thing)
// We'll not actually evaluate the actual results in here because
// this piece of code should be replaced with the modbus tool internal connected detection when it's ready
ModbusRtuReply *reply = connection->readCpSignalState();
connect(reply, &ModbusRtuReply::finished, [reply, thing](){
connect(reply, &ModbusRtuReply::finished, thing, [reply, thing](){
qCDebug(dcSchrack) << "CP signal state reply finished" << reply->error();
thing->setStateValue(cionConnectedStateTypeId, reply->error() == ModbusRtuReply::NoError);
});