forked from Mirrorlandia_minetest/minetest
Remove weird command procession limit
it was set to 1 too, wtf?!
This commit is contained in:
parent
abf3142b26
commit
9f684eac92
@ -1158,16 +1158,13 @@ bool UDPPeer::processReliableSendCommand(
|
|||||||
|
|
||||||
void UDPPeer::RunCommandQueues(
|
void UDPPeer::RunCommandQueues(
|
||||||
unsigned int max_packet_size,
|
unsigned int max_packet_size,
|
||||||
unsigned int maxcommands,
|
|
||||||
unsigned int maxtransfer)
|
unsigned int maxtransfer)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (Channel &channel : channels) {
|
for (Channel &channel : channels) {
|
||||||
unsigned int commands_processed = 0;
|
|
||||||
|
|
||||||
if ((!channel.queued_commands.empty()) &&
|
if ((!channel.queued_commands.empty()) &&
|
||||||
(channel.queued_reliables.size() < maxtransfer) &&
|
(channel.queued_reliables.size() < maxtransfer)) {
|
||||||
(commands_processed < maxcommands)) {
|
|
||||||
try {
|
try {
|
||||||
ConnectionCommandPtr c = channel.queued_commands.front();
|
ConnectionCommandPtr c = channel.queued_commands.front();
|
||||||
|
|
||||||
|
@ -645,7 +645,6 @@ protected:
|
|||||||
|
|
||||||
void RunCommandQueues(
|
void RunCommandQueues(
|
||||||
unsigned int max_packet_size,
|
unsigned int max_packet_size,
|
||||||
unsigned int maxcommands,
|
|
||||||
unsigned int maxtransfer);
|
unsigned int maxtransfer);
|
||||||
|
|
||||||
float getResendTimeout()
|
float getResendTimeout()
|
||||||
|
@ -248,9 +248,7 @@ void ConnectionSendThread::runTimeouts(float dtime)
|
|||||||
rawSendAsPacket(udpPeer->id, 0, data, true);
|
rawSendAsPacket(udpPeer->id, 0, data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
udpPeer->RunCommandQueues(m_max_packet_size,
|
udpPeer->RunCommandQueues(m_max_packet_size, m_max_packets_requeued);
|
||||||
m_max_commands_per_iteration,
|
|
||||||
m_max_packets_requeued);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove timed out peers
|
// Remove timed out peers
|
||||||
|
@ -102,7 +102,6 @@ private:
|
|||||||
Semaphore m_send_sleep_semaphore;
|
Semaphore m_send_sleep_semaphore;
|
||||||
|
|
||||||
unsigned int m_iteration_packets_avaialble;
|
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_data_packets_per_iteration;
|
||||||
unsigned int m_max_packets_requeued = 256;
|
unsigned int m_max_packets_requeued = 256;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user