Skip to content

Commit

Permalink
Fix bug only half of unreliable queue handled per step in worst case
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and sapier committed Jan 26, 2014
1 parent 9b978db commit 3f0ee5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/connection.cpp
Expand Up @@ -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 &&
Expand Down

0 comments on commit 3f0ee5d

Please sign in to comment.