summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-08-14 17:29:50 -0400
committerirungentoo <irungentoo@gmail.com>2014-08-14 17:29:50 -0400
commitcb815f7584ba15a05ac65ee6cc3ec53bb9732fa5 (patch)
tree37bbee24ac8b5e39498bfe3e5037e7a776e45637
parentfb9fc81a3510074bcfaa3caeee2aa19ddca8657f (diff)
When getting disconnected from good relay, try to reconnect.
-rw-r--r--toxcore/net_crypto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index f26e40f6..463b7356 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -2107,6 +2107,8 @@ static void clear_disconnected_tcp(Net_Crypto *c)
2107 continue; 2107 continue;
2108 2108
2109 c->tcp_connections[i] = NULL; 2109 c->tcp_connections[i] = NULL;
2110 /* Try reconnecting to relay on disconnect. */
2111 add_tcp_relay(c, tcp_con->ip_port, tcp_con->public_key);
2110 kill_TCP_connection(tcp_con); 2112 kill_TCP_connection(tcp_con);
2111 2113
2112 for (j = 0; j < c->crypto_connections_length; ++j) { 2114 for (j = 0; j < c->crypto_connections_length; ++j) {