Skip to content

Commit

Permalink
Remove weird command procession limit
Browse files Browse the repository at this point in the history
it was set to 1 too, wtf?!
  • Loading branch information
sfan5 committed Jan 17, 2024
1 parent abf3142 commit 9f684ea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/network/connection.cpp
Expand Up @@ -1158,16 +1158,13 @@ bool UDPPeer::processReliableSendCommand(

void UDPPeer::RunCommandQueues(
unsigned int max_packet_size,
unsigned int maxcommands,
unsigned int maxtransfer)
{

for (Channel &channel : channels) {
unsigned int commands_processed = 0;

if ((!channel.queued_commands.empty()) &&
(channel.queued_reliables.size() < maxtransfer) &&
(commands_processed < maxcommands)) {
(channel.queued_reliables.size() < maxtransfer)) {
try {
ConnectionCommandPtr c = channel.queued_commands.front();

Expand Down
1 change: 0 additions & 1 deletion src/network/connection.h
Expand Up @@ -645,7 +645,6 @@ class UDPPeer : public Peer

void RunCommandQueues(
unsigned int max_packet_size,
unsigned int maxcommands,
unsigned int maxtransfer);

float getResendTimeout()
Expand Down
4 changes: 1 addition & 3 deletions src/network/connectionthreads.cpp
Expand Up @@ -248,9 +248,7 @@ void ConnectionSendThread::runTimeouts(float dtime)
rawSendAsPacket(udpPeer->id, 0, data, true);
}

udpPeer->RunCommandQueues(m_max_packet_size,
m_max_commands_per_iteration,
m_max_packets_requeued);
udpPeer->RunCommandQueues(m_max_packet_size, m_max_packets_requeued);
}

// Remove timed out peers
Expand Down
1 change: 0 additions & 1 deletion src/network/connectionthreads.h
Expand Up @@ -102,7 +102,6 @@ class ConnectionSendThread : public Thread
Semaphore m_send_sleep_semaphore;

unsigned int m_iteration_packets_avaialble;
unsigned int m_max_commands_per_iteration = 1;
unsigned int m_max_data_packets_per_iteration;
unsigned int m_max_packets_requeued = 256;
};
Expand Down

0 comments on commit 9f684ea

Please sign in to comment.