diff options
author | irungentoo <irungentoo@gmail.com> | 2014-07-21 13:29:36 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-07-21 13:29:36 -0400 |
commit | fdb5d890a3b211ecc95450887c99d2891d405728 (patch) | |
tree | dd513eed7353523e3d3e1642b2f27b60ed62c2d5 /toxcore | |
parent | 8d15ccc3471a7ea7216b659b7ba04f1ed4e6c8aa (diff) |
Fixed bug where two Tox clients sometimes didn't reconnect right
after disconnecting due to them getting stuck in a connection loop.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/net_crypto.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |||
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | case NET_PACKET_CRYPTO_HS: { | 1188 | case NET_PACKET_CRYPTO_HS: { |
1189 | if (conn->status == CRYPTO_CONN_COOKIE_REQUESTING || conn->status == CRYPTO_CONN_HANDSHAKE_SENT) { | 1189 | if (conn->status == CRYPTO_CONN_COOKIE_REQUESTING || conn->status == CRYPTO_CONN_HANDSHAKE_SENT |
1190 | || conn->status == CRYPTO_CONN_NOT_CONFIRMED) { | ||
1190 | uint8_t peer_real_pk[crypto_box_PUBLICKEYBYTES]; | 1191 | uint8_t peer_real_pk[crypto_box_PUBLICKEYBYTES]; |
1191 | uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES]; | 1192 | uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES]; |
1192 | uint8_t cookie[COOKIE_LENGTH]; | 1193 | uint8_t cookie[COOKIE_LENGTH]; |