Skip to content

Commit

Permalink
protocol::Board ignores empty packets
Browse files Browse the repository at this point in the history
  • Loading branch information
kalanzun committed Dec 2, 2019
1 parent 9581a2c commit b897f7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lenlab/protocol/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ Board::on_reply(usb::pPacket const & packet)
auto task = mTask;
auto message = pMessage::create(packet);

if (task) {
if (packet->getByteLength() < LENLAB_PACKET_HEAD_LENGTH) {
emit log("Leeres Paket empfangen.");
} else if (task) {
if (message->getReply() == Error) {
task->setError(message);
mTask.clear();
Expand Down

0 comments on commit b897f7e

Please sign in to comment.