mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed bug where two Tox clients sometimes didn't reconnect right
after disconnecting due to them getting stuck in a connection loop.
This commit is contained in:
parent
8d15ccc347
commit
fdb5d890a3
|
@ -1186,7 +1186,8 @@ static int handle_packet_connection(Net_Crypto *c, int crypt_connection_id, cons
|
||||||
}
|
}
|
||||||
|
|
||||||
case NET_PACKET_CRYPTO_HS: {
|
case NET_PACKET_CRYPTO_HS: {
|
||||||
if (conn->status == CRYPTO_CONN_COOKIE_REQUESTING || conn->status == CRYPTO_CONN_HANDSHAKE_SENT) {
|
if (conn->status == CRYPTO_CONN_COOKIE_REQUESTING || conn->status == CRYPTO_CONN_HANDSHAKE_SENT
|
||||||
|
|| conn->status == CRYPTO_CONN_NOT_CONFIRMED) {
|
||||||
uint8_t peer_real_pk[crypto_box_PUBLICKEYBYTES];
|
uint8_t peer_real_pk[crypto_box_PUBLICKEYBYTES];
|
||||||
uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES];
|
uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES];
|
||||||
uint8_t cookie[COOKIE_LENGTH];
|
uint8_t cookie[COOKIE_LENGTH];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user