mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Qt 5.10 seems to indicate pendingDatagramSizes of 0. Reading from these would block and causes an QAbstractSocket::TemporaryError to be thrown
This commit is contained in:
parent
97abdb63db
commit
3027d3461e
1 changed files with 2 additions and 2 deletions
|
@ -328,14 +328,14 @@ void Socket::checkForReadyReadBackup() {
|
|||
void Socket::readPendingDatagrams() {
|
||||
int packetSizeWithHeader = -1;
|
||||
|
||||
while ((packetSizeWithHeader = _udpSocket.pendingDatagramSize()) != -1) {
|
||||
while ((packetSizeWithHeader = _udpSocket.pendingDatagramSize()) > 0) {
|
||||
|
||||
// we're reading a packet so re-start the readyRead backup timer
|
||||
_readyReadBackupTimer->start();
|
||||
|
||||
// grab a time point we can mark as the receive time of this packet
|
||||
auto receiveTime = p_high_resolution_clock::now();
|
||||
|
||||
|
||||
// setup a HifiSockAddr to read into
|
||||
HifiSockAddr senderSockAddr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue