mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
don't rely on return value of pendingDatagramSize() when hasPendingDatagrams() is false
This commit is contained in:
parent
3027d3461e
commit
0a92596452
1 changed files with 1 additions and 1 deletions
|
@ -328,7 +328,7 @@ void Socket::checkForReadyReadBackup() {
|
|||
void Socket::readPendingDatagrams() {
|
||||
int packetSizeWithHeader = -1;
|
||||
|
||||
while ((packetSizeWithHeader = _udpSocket.pendingDatagramSize()) > 0) {
|
||||
while (_udpSocket.hasPendingDatagrams() && (packetSizeWithHeader = _udpSocket.pendingDatagramSize()) != -1) {
|
||||
|
||||
// we're reading a packet so re-start the readyRead backup timer
|
||||
_readyReadBackupTimer->start();
|
||||
|
|
Loading…
Reference in a new issue