From d7508e82cf293530f66d73cff283d45fa2211fd8 Mon Sep 17 00:00:00 2001 From: Brett Weir Date: Wed, 30 Sep 2015 07:28:27 -0700 Subject: [PATCH] Add timeout.timeout() connections that I removed on accident. --- src/lib/propellersession.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/propellersession.cpp b/src/lib/propellersession.cpp index 6dc039f..ee633db 100644 --- a/src/lib/propellersession.cpp +++ b/src/lib/propellersession.cpp @@ -174,12 +174,12 @@ int PropellerSession::version() device.reset(); device.write(payload); - connect(&device, SIGNAL(readyRead()), this, SLOT(read_handshake())); + connect(&device, SIGNAL(readyRead()),this, SLOT(read_handshake())); QEventLoop loop; - connect(this, SIGNAL(finished()), &loop, SLOT(quit())); - + connect(this, SIGNAL(finished()), &loop, SLOT(quit())); + connect(&timeout, SIGNAL(timeout()), &loop, SLOT(quit())); loop.exec(); @@ -544,7 +544,8 @@ bool PropellerSession::sendPayload(QByteArray payload) device.write(payload); QEventLoop loop; - connect(this, SIGNAL(finished()), &loop, SLOT(quit())); + connect(this, SIGNAL(finished()),&loop, SLOT(quit())); + connect(&timeout,SIGNAL(timeout()), &loop, SLOT(quit())); loop.exec();