mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:00:44 +02:00
flush after each call to writeDatagram
This commit is contained in:
parent
08bfc15b70
commit
68d55152b9
1 changed files with 7 additions and 1 deletions
|
@ -171,7 +171,13 @@ qint64 NodeList::writeDatagram(const QByteArray& datagram, const HifiSockAddr& d
|
||||||
++_numCollectedPackets;
|
++_numCollectedPackets;
|
||||||
_numCollectedBytes += datagram.size();
|
_numCollectedBytes += datagram.size();
|
||||||
|
|
||||||
return _nodeSocket.writeDatagram(datagramCopy, destinationSockAddr.getAddress(), destinationSockAddr.getPort());
|
qint64 bytesWritten = _nodeSocket.writeDatagram(datagramCopy,
|
||||||
|
destinationSockAddr.getAddress(),
|
||||||
|
destinationSockAddr.getPort());
|
||||||
|
|
||||||
|
// ask the underlying QUdpSocket to flush its buffers to avoid filling them up
|
||||||
|
_nodeSocket.flush();
|
||||||
|
return bytesWritten;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue