Commit 3d4f2d8f authored by Gus Grubba's avatar Gus Grubba

Flag thread blockers

parent 604e12f6
......@@ -51,6 +51,7 @@ MicrohardHandler::_start(uint16_t port, QHostAddress addr)
QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &MicrohardHandler::_readBytes);
qCDebug(MicrohardLog) << "Connecting to" << addr;
_tcpSocket->connectToHost(addr, port);
//-- TODO: This has to be removed. It's blocking the main thread.
if (!_tcpSocket->waitForConnected(1000)) {
emit connected(0);
close();
......
......@@ -65,6 +65,7 @@ TaisyncHandler::_start(uint16_t port, QHostAddress addr)
QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &TaisyncHandler::_readBytes);
qCDebug(TaisyncLog) << "Connecting to" << addr;
_tcpSocket->connectToHost(addr, port);
//-- TODO: This has to be removed. It's blocking the main thread.
if (!_tcpSocket->waitForConnected(1000)) {
close();
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment