Skip to content

Commit dedf863

Browse files
committed
Fixed possible bug.
1 parent 07b4b04 commit dedf863

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

toxcore/net_crypto.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,7 @@ int accept_crypto_connection(Net_Crypto *c, New_Connection *n_c)
17041704

17051705
memcpy(conn->dht_public_key, n_c->dht_public_key, crypto_box_PUBLICKEYBYTES);
17061706
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
1707+
conn->packet_send_rate_requested = CRYPTO_PACKET_MIN_RATE;
17071708
conn->packets_left = CRYPTO_MIN_QUEUE_LENGTH;
17081709
conn->rtt_time = DEFAULT_PING_CONNECTION;
17091710
crypto_connection_add_source(c, crypt_connection_id, n_c->source);
@@ -1746,6 +1747,7 @@ int new_crypto_connection(Net_Crypto *c, const uint8_t *real_public_key, const u
17461747
crypto_box_keypair(conn->sessionpublic_key, conn->sessionsecret_key);
17471748
conn->status = CRYPTO_CONN_COOKIE_REQUESTING;
17481749
conn->packet_send_rate = CRYPTO_PACKET_MIN_RATE;
1750+
conn->packet_send_rate_requested = CRYPTO_PACKET_MIN_RATE;
17491751
conn->packets_left = CRYPTO_MIN_QUEUE_LENGTH;
17501752
conn->rtt_time = DEFAULT_PING_CONNECTION;
17511753
memcpy(conn->dht_public_key, dht_public_key, crypto_box_PUBLICKEYBYTES);

0 commit comments

Comments
 (0)