Fix connected state for tcp server while set up

pull/555/head
Simon Stürz 2022-04-13 15:53:53 +02:00
parent 1f411c2244
commit a152974228
1 changed files with 3 additions and 1 deletions

View File

@ -91,7 +91,9 @@ void IntegrationPluginTcpCommander::setupThing(ThingSetupInfo *info)
m_tcpServers.insert(thing, tcpServer);
connect(tcpServer, &TcpServer::connectionCountChanged, this, &IntegrationPluginTcpCommander::onTcpServerConnectionCountChanged);
connect(tcpServer, &TcpServer::commandReceived, this, &IntegrationPluginTcpCommander::onTcpServerCommandReceived);
return info->finish(Thing::ThingErrorNoError);
info->finish(Thing::ThingErrorNoError);
thing->setStateValue("connected", true);
return;
} else {
tcpServer->deleteLater();
qDebug(dcTCPCommander()) << "Could not open TCP Server";