Browse Source

Flag thread blockers

QGC4.4
Gus Grubba 6 years ago
parent
commit
3d4f2d8f9b
  1. 1
      src/Microhard/MicrohardHandler.cc
  2. 1
      src/Taisync/TaisyncHandler.cc

1
src/Microhard/MicrohardHandler.cc

@ -51,6 +51,7 @@ MicrohardHandler::_start(uint16_t port, QHostAddress addr)
QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &MicrohardHandler::_readBytes); QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &MicrohardHandler::_readBytes);
qCDebug(MicrohardLog) << "Connecting to" << addr; qCDebug(MicrohardLog) << "Connecting to" << addr;
_tcpSocket->connectToHost(addr, port); _tcpSocket->connectToHost(addr, port);
//-- TODO: This has to be removed. It's blocking the main thread.
if (!_tcpSocket->waitForConnected(1000)) { if (!_tcpSocket->waitForConnected(1000)) {
emit connected(0); emit connected(0);
close(); close();

1
src/Taisync/TaisyncHandler.cc

@ -65,6 +65,7 @@ TaisyncHandler::_start(uint16_t port, QHostAddress addr)
QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &TaisyncHandler::_readBytes); QObject::connect(_tcpSocket, &QIODevice::readyRead, this, &TaisyncHandler::_readBytes);
qCDebug(TaisyncLog) << "Connecting to" << addr; qCDebug(TaisyncLog) << "Connecting to" << addr;
_tcpSocket->connectToHost(addr, port); _tcpSocket->connectToHost(addr, port);
//-- TODO: This has to be removed. It's blocking the main thread.
if (!_tcpSocket->waitForConnected(1000)) { if (!_tcpSocket->waitForConnected(1000)) {
close(); close();
return false; return false;

Loading…
Cancel
Save