mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Optimized data sending slightly more.
This commit is contained in:
parent
e30105af20
commit
572fb60392
|
@ -860,8 +860,8 @@ static void adjust_datasendspeed(Connection *connection, uint32_t req_packets)
|
|||
return;
|
||||
}
|
||||
|
||||
if (req_packets <= (connection->data_rate / connection->SYNC_rate) / 5 || req_packets <= 10) {
|
||||
connection->data_rate += (connection->data_rate / 8) + 1;
|
||||
if (req_packets <= (connection->data_rate / connection->SYNC_rate) / 4 || req_packets <= 10) {
|
||||
connection->data_rate += (connection->data_rate / 4) + 1;
|
||||
|
||||
if (connection->data_rate > connection->sendbuffer_length * connection->SYNC_rate)
|
||||
connection->data_rate = connection->sendbuffer_length * connection->SYNC_rate;
|
||||
|
|
Loading…
Reference in New Issue
Block a user