1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 22:13:02 +01:00

a little overkill

This commit is contained in:
Jfreegman 2013-08-12 05:59:08 -04:00
parent a8d2ab1af0
commit 8162cfde0d

7
main.c
View File

@ -247,12 +247,11 @@ static void init_windows()
static void do_tox() static void do_tox()
{ {
static int conn_try = 1; static int conn_try = 0;
static bool dht_on = false; static bool dht_on = false;
if (!dht_on && !DHT_isconnected()) { if (!dht_on && !DHT_isconnected() && !(conn_try++ % 100)) {
init_connection(); init_connection();
if (!(conn_try++ % 100)) wprintw(prompt->window, "\nEstablishing connection...\n");
wprintw(prompt->window, "\nAttempting to connect...\n");
} }
else if (!dht_on && DHT_isconnected()) { else if (!dht_on && DHT_isconnected()) {
dht_on = true; dht_on = true;