summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxcore/Lossless_UDP.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/Lossless_UDP.c b/toxcore/Lossless_UDP.c
index 8d447534..d8e5927f 100644
--- a/toxcore/Lossless_UDP.c
+++ b/toxcore/Lossless_UDP.c
@@ -830,7 +830,7 @@ static void adjust_datasendspeed(Connection *connection, uint32_t req_packets)
830 } 830 }
831 831
832 if (req_packets <= (connection->data_rate / connection->SYNC_rate) / 20 || req_packets <= 1) { 832 if (req_packets <= (connection->data_rate / connection->SYNC_rate) / 20 || req_packets <= 1) {
833 connection->data_rate += connection->data_rate / 8; 833 connection->data_rate += (connection->data_rate / 8) + 1;
834 834
835 if (connection->data_rate > connection->sendbuffer_length * connection->SYNC_rate) 835 if (connection->data_rate > connection->sendbuffer_length * connection->SYNC_rate)
836 connection->data_rate = connection->sendbuffer_length * connection->SYNC_rate; 836 connection->data_rate = connection->sendbuffer_length * connection->SYNC_rate;
@@ -858,7 +858,7 @@ static int handle_SYNC3(Lossless_UDP *ludp, int connection_id, uint8_t counter,
858 /* Packet valid. */ 858 /* Packet valid. */
859 if (comp_1 <= connection->sendbuffer_length && 859 if (comp_1 <= connection->sendbuffer_length &&
860 comp_2 <= MAX_QUEUE_NUM && 860 comp_2 <= MAX_QUEUE_NUM &&
861 comp_counter != 0 && comp_counter < 4) { 861 comp_counter != 0 && comp_counter < 8) {
862 connection->orecv_packetnum = recv_packetnum; 862 connection->orecv_packetnum = recv_packetnum;
863 connection->osent_packetnum = sent_packetnum; 863 connection->osent_packetnum = sent_packetnum;
864 connection->successful_sent = recv_packetnum; 864 connection->successful_sent = recv_packetnum;