Skip to content

Commit

Permalink
Ignore when receiving 0 \r\n
Browse files Browse the repository at this point in the history
  • Loading branch information
kalanzun committed Feb 15, 2020
1 parent 74b5874 commit 5a7f6ca
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions receiver/receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ void Receiver::read()

QVector<QStringRef> data = raw_data.splitRef(" ");

fire->parse(data);
// sometimes, it just reads "0 \r\n"
if (data.size() > 2) {
fire->parse(data);

watchdog = true;
connecting = false;
}

watchdog = true;
connecting = false;
// else {
// qDebug() << "ignore";
// }
}

void Receiver::error(QAbstractSocket::SocketError socketError)
Expand Down

0 comments on commit 5a7f6ca

Please sign in to comment.