From: sapier Date: Sun, 26 Jan 2014 15:59:36 +0000 (+0100) Subject: Fix bug only half of unreliable queue handled per step in worst case X-Git-Tag: 0.4.10~296 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F1120%2Fhead;p=oweals%2Fminetest.git Fix bug only half of unreliable queue handled per step in worst case --- diff --git a/src/connection.cpp b/src/connection.cpp index 9f167266c..2e126a770 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -1843,8 +1843,9 @@ void ConnectionSendThread::sendPackets(float dtime) << m_outgoing_queue.size() << " pkts)" << std::endl); } + unsigned int initial_queuesize = m_outgoing_queue.size(); /* send non reliable packets*/ - for(unsigned int i=0;i < m_outgoing_queue.size();i++) { + for(unsigned int i=0;i < initial_queuesize;i++) { OutgoingPacket packet = m_outgoing_queue.pop_front(); assert(!packet.reliable &&