summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-01-26 16:59:36 +0100
committersapier <Sapier at GMX dot net>2014-01-26 17:40:59 +0100
commit3f0ee5d6800302f0ad7e56f0aa4ddddddae86823 (patch)
tree253b21944e04fd16307787dca5e70cc26e19cc93 /src
parent9b978db0c2578b06c5669096e325c1ce70864edc (diff)
downloadminetest-3f0ee5d6800302f0ad7e56f0aa4ddddddae86823.tar.gz
minetest-3f0ee5d6800302f0ad7e56f0aa4ddddddae86823.tar.bz2
minetest-3f0ee5d6800302f0ad7e56f0aa4ddddddae86823.zip
Fix bug only half of unreliable queue handled per step in worst case
Diffstat (limited to 'src')
-rw-r--r--src/connection.cpp3
1 files changed, 2 insertions, 1 deletions
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 &&