Attempted fix of Tox disconnecting during file transfers by tweaking

some congestion control numbers.
This commit is contained in:
irungentoo 2015-01-17 21:27:38 -05:00
parent a8bf060815
commit 6e0b807f09
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 3 additions and 3 deletions

View File

@ -2412,7 +2412,7 @@ static int udp_handle_packet(void *object, IP_Port source, const uint8_t *packet
/* The dT for the average packet receiving rate calculations.
Also used as the */
#define PACKET_COUNTER_AVERAGE_INTERVAL 100
#define PACKET_COUNTER_AVERAGE_INTERVAL 50
/* Ratio of recv queue size / recv packet rate (in seconds) times
* the number of ms between request packets to send at that ratio
@ -2495,7 +2495,7 @@ static void send_crypto_packets(Net_Crypto *c)
double min_speed = 1000.0 * (((double)(total_sent)) / ((double)(CONGESTION_QUEUE_ARRAY_SIZE) *
PACKET_COUNTER_AVERAGE_INTERVAL));
conn->packet_send_rate = min_speed * 1.3;
conn->packet_send_rate = min_speed * 1.2;
if (conn->packet_send_rate < CRYPTO_PACKET_MIN_RATE) {
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;

View File

@ -86,7 +86,7 @@
/* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken
at the dT defined in net_crypto.c */
#define CONGESTION_QUEUE_ARRAY_SIZE 8
#define CONGESTION_QUEUE_ARRAY_SIZE 24
typedef struct {
uint64_t time;