summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore')
-rw-r--r--toxcore/net_crypto.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 7c0dd77b..bb1bbe05 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -2318,8 +2318,12 @@ static void send_crypto_packets(Net_Crypto *c)
2318 conn->packets_resent = 0; 2318 conn->packets_resent = 0;
2319 conn->last_queue_size = queue_size; 2319 conn->last_queue_size = queue_size;
2320 2320
2321 if (conn->packet_send_rate < CRYPTO_PACKET_MIN_RATE || !conn->sending || !conn->packets_sent) { 2321 if (!conn->sending || !conn->packets_sent) {
2322 conn->rate_increase = 0; 2322 conn->rate_increase = 0;
2323 conn->packet_send_rate /= 2;
2324 }
2325
2326 if (conn->packet_send_rate < CRYPTO_PACKET_MIN_RATE) {
2323 conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE; 2327 conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
2324 } 2328 }
2325 2329