mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
file transfer fixes
-removed rate limit -send rate no longer gets reset on local/LAN connections
This commit is contained in:
parent
e3bc591b3b
commit
5346af8067
|
@ -2257,8 +2257,9 @@ static void send_crypto_packets(Net_Crypto *c)
|
||||||
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
|
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->packet_send_rate > CRYPTO_PACKET_BUFFER_SIZE * 2)
|
if (conn->sending != 0 && num_packets_array(&conn->send_array) < CRYPTO_MIN_QUEUE_LENGTH / 2) {
|
||||||
conn->packet_send_rate = CRYPTO_PACKET_BUFFER_SIZE * 2;
|
--conn->sending;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2285,10 +2286,6 @@ static void send_crypto_packets(Net_Crypto *c)
|
||||||
conn->packets_resent += ret;
|
conn->packets_resent += ret;
|
||||||
conn->packets_left -= ret;
|
conn->packets_left -= ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->sending != 0 && num_packets_array(&conn->send_array) < CRYPTO_MIN_QUEUE_LENGTH / 2) {
|
|
||||||
--conn->sending;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user