diff options
author | irungentoo <irungentoo@gmail.com> | 2014-07-14 12:21:13 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-07-14 12:21:13 -0400 |
commit | 0244bd596deaba90bcf9282e1709ea5f25b328ca (patch) | |
tree | 39d0a5ed3ae531ecdecee4b6d88c120f6a1b848e /toxcore | |
parent | 2119a35604c20bad36605c86b2d07a634eb01792 (diff) |
Attempted fix of file transfer issue.
Instead of dropping the rate to minimum just half it until it drops
to the minimum.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/net_crypto.c | 6 |
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 | ||