From fdb5d890a3b211ecc95450887c99d2891d405728 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 21 Jul 2014 13:29:36 -0400 Subject: Fixed bug where two Tox clients sometimes didn't reconnect right after disconnecting due to them getting stuck in a connection loop. --- toxcore/net_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toxcore') diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 5387065c..e67251f6 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -1186,7 +1186,8 @@ static int handle_packet_connection(Net_Crypto *c, int crypt_connection_id, cons } 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 dht_public_key[crypto_box_PUBLICKEYBYTES]; uint8_t cookie[COOKIE_LENGTH]; -- cgit v1.2.3