mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Attempted fix of Tox disconnecting during file transfers by tweaking
some congestion control numbers.
This commit is contained in:
parent
a8bf060815
commit
6e0b807f09
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user