Skip to content

Commit

Permalink
Add timeout.timeout() connections that I removed on accident.
Browse files Browse the repository at this point in the history
  • Loading branch information
bweir committed Sep 30, 2015
1 parent 07a7769 commit d7508e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lib/propellersession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d7508e8

Please sign in to comment.