From dfe00abc5addd66dbf840d7e826690291f4afd93 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sun, 29 Mar 2015 10:49:43 +0200 Subject: queued_commands must be a std::deque. RunCommandQueues needs to push packet on front, not back --- src/network/connection.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/network/connection.cpp') diff --git a/src/network/connection.cpp b/src/network/connection.cpp index d51324ed4..4440b8cc7 100644 --- a/src/network/connection.cpp +++ b/src/network/connection.cpp @@ -1063,14 +1063,14 @@ void UDPPeer::PutReliableSendCommand(ConnectionCommand &c, <<" processing reliable command for peer id: " << c.peer_id <<" data size: " << c.data.getSize() << std::endl); if (!processReliableSendCommand(c,max_packet_size)) { - channels[c.channelnum].queued_commands.push(c); + channels[c.channelnum].queued_commands.push_back(c); } } else { LOG(dout_con<getDesc() <<" Queueing reliable command for peer id: " << c.peer_id <<" data size: " << c.data.getSize() < 0) && (channels[i].queued_reliables.size() < maxtransfer) && - (commands_processed < maxcommands)) - { + (commands_processed < maxcommands)) { try { ConnectionCommand c = channels[i].queued_commands.front(); - channels[i].queued_commands.pop(); + channels[i].queued_commands.pop_front(); LOG(dout_con<getDesc() <<" processing queued reliable command "<(&peer) == 0) continue; - for(u16 i=0; i(&peer))->channels[i]; - if (channel->queued_commands.size() > 0) - { + if (channel->queued_commands.size() > 0) { return true; } } -- cgit v1.2.3