pull all available datagrams in Application processDatagrams

This commit is contained in:
Stephen Birarda 2014-01-14 10:01:11 -08:00
parent 3ab7a6d9d5
commit cbcdeb570b

View file

@ -4263,7 +4263,7 @@ void Application::processDatagrams() {
HifiSockAddr senderSockAddr;
ssize_t bytesReceived;
if (NodeList::getInstance()->getNodeSocket().hasPendingDatagrams() &&
while (NodeList::getInstance()->getNodeSocket().hasPendingDatagrams() &&
(bytesReceived = NodeList::getInstance()->getNodeSocket().readDatagram((char*) _incomingPacket,
MAX_PACKET_SIZE,
senderSockAddr.getAddressPointer(),