diff --git a/ground/src/plugins/hitlnew/simulator.cpp b/ground/src/plugins/hitlnew/simulator.cpp index 0a2818c6a..c07283fc5 100644 --- a/ground/src/plugins/hitlnew/simulator.cpp +++ b/ground/src/plugins/hitlnew/simulator.cpp @@ -183,8 +183,7 @@ void Simulator::receiveUpdate() } // Process data - while(inSocket->bytesAvailable() > 0) - { + while(inSocket->hasPendingDatagrams()) { // Receive datagram QByteArray datagram; datagram.resize(inSocket->pendingDatagramSize());