diff --git a/src/Microhard/MicrohardHandler.cc b/src/Microhard/MicrohardHandler.cc index b621eb7..61ca9aa 100644 --- a/src/Microhard/MicrohardHandler.cc +++ b/src/Microhard/MicrohardHandler.cc @@ -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(); diff --git a/src/Taisync/TaisyncHandler.cc b/src/Taisync/TaisyncHandler.cc index 5411222..ff70e56 100644 --- a/src/Taisync/TaisyncHandler.cc +++ b/src/Taisync/TaisyncHandler.cc @@ -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;