Fix connected state for tcp server while set up
This commit is contained in:
parent
1f411c2244
commit
a152974228
@ -91,7 +91,9 @@ void IntegrationPluginTcpCommander::setupThing(ThingSetupInfo *info)
|
|||||||
m_tcpServers.insert(thing, tcpServer);
|
m_tcpServers.insert(thing, tcpServer);
|
||||||
connect(tcpServer, &TcpServer::connectionCountChanged, this, &IntegrationPluginTcpCommander::onTcpServerConnectionCountChanged);
|
connect(tcpServer, &TcpServer::connectionCountChanged, this, &IntegrationPluginTcpCommander::onTcpServerConnectionCountChanged);
|
||||||
connect(tcpServer, &TcpServer::commandReceived, this, &IntegrationPluginTcpCommander::onTcpServerCommandReceived);
|
connect(tcpServer, &TcpServer::commandReceived, this, &IntegrationPluginTcpCommander::onTcpServerCommandReceived);
|
||||||
return info->finish(Thing::ThingErrorNoError);
|
info->finish(Thing::ThingErrorNoError);
|
||||||
|
thing->setStateValue("connected", true);
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
tcpServer->deleteLater();
|
tcpServer->deleteLater();
|
||||||
qDebug(dcTCPCommander()) << "Could not open TCP Server";
|
qDebug(dcTCPCommander()) << "Could not open TCP Server";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user