From a152974228b8bbb69768bda635bfdd6b289ac77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Wed, 13 Apr 2022 15:53:53 +0200 Subject: [PATCH] Fix connected state for tcp server while set up --- tcpcommander/integrationplugintcpcommander.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcpcommander/integrationplugintcpcommander.cpp b/tcpcommander/integrationplugintcpcommander.cpp index bce407b7..7ddc4979 100644 --- a/tcpcommander/integrationplugintcpcommander.cpp +++ b/tcpcommander/integrationplugintcpcommander.cpp @@ -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";