diff options
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index d975a356..ef3a52e7 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -832,8 +832,6 @@ static int64_t send_lossless_packet(Net_Crypto *c, int crypt_connection_id, cons | |||
832 | return packet_num; | 832 | return packet_num; |
833 | } | 833 | } |
834 | 834 | ||
835 | conn->maximum_speed_reached = 0; | ||
836 | |||
837 | if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) { | 835 | if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) { |
838 | Packet_Data *dt1 = NULL; | 836 | Packet_Data *dt1 = NULL; |
839 | get_data_pointer(&conn->send_array, &dt1, packet_num); | 837 | get_data_pointer(&conn->send_array, &dt1, packet_num); |
@@ -2350,7 +2348,7 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2350 | conn->packet_counter_set = temp_time; | 2348 | conn->packet_counter_set = temp_time; |
2351 | 2349 | ||
2352 | uint32_t packets_sent = conn->packets_sent; | 2350 | uint32_t packets_sent = conn->packets_sent; |
2353 | conn->packets_sent = conn->packets_resent = 0; | 2351 | conn->packets_sent = 0; |
2354 | 2352 | ||
2355 | /* conjestion control | 2353 | /* conjestion control |
2356 | calculate a new value of conn->packet_send_rate based on some data | 2354 | calculate a new value of conn->packet_send_rate based on some data |
@@ -2404,7 +2402,6 @@ static void send_crypto_packets(Net_Crypto *c) | |||
2404 | 2402 | ||
2405 | if (ret != -1) { | 2403 | if (ret != -1) { |
2406 | conn->packets_left -= ret; | 2404 | conn->packets_left -= ret; |
2407 | conn->packets_resent += ret; | ||
2408 | } | 2405 | } |
2409 | 2406 | ||
2410 | if (conn->packet_send_rate > CRYPTO_PACKET_MIN_RATE * 1.5) { | 2407 | if (conn->packet_send_rate > CRYPTO_PACKET_MIN_RATE * 1.5) { |