diff options
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index dcc32486..8d598469 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -2289,7 +2289,7 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2289 | 2289 | ||
2290 | if (conn->last_packets_left_set == 0) { | 2290 | if (conn->last_packets_left_set == 0) { |
2291 | conn->last_packets_left_set = temp_time; | 2291 | conn->last_packets_left_set = temp_time; |
2292 | conn->packets_left = conn->packet_send_rate; | 2292 | conn->packets_left = CRYPTO_MIN_QUEUE_LENGTH; |
2293 | } else if (((1000.0 / conn->packet_send_rate) + conn->last_packets_left_set) < temp_time) { | 2293 | } else if (((1000.0 / conn->packet_send_rate) + conn->last_packets_left_set) < temp_time) { |
2294 | uint32_t num_packets = conn->packet_send_rate * ((double)(temp_time - conn->last_packets_left_set) / 1000.0) + 0.5; | 2294 | uint32_t num_packets = conn->packet_send_rate * ((double)(temp_time - conn->last_packets_left_set) / 1000.0) + 0.5; |
2295 | 2295 | ||