diff options
author | Jfreegman <Jfreegman@gmail.com> | 2013-08-12 05:59:08 -0400 |
---|---|---|
committer | Jfreegman <Jfreegman@gmail.com> | 2013-08-12 05:59:08 -0400 |
commit | d87b79d368c3acf24c518f7e0f8e9e976d94b731 (patch) | |
tree | 82866a6174a9c5d7c91b9702d7f10b13dca2679e /testing | |
parent | 46209d958f9bac05d83a9ebaeb8d11c3cd6c9c41 (diff) |
a little overkill
Diffstat (limited to 'testing')
-rw-r--r-- | testing/toxic/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/testing/toxic/main.c b/testing/toxic/main.c index 9bf0b9f6..3550ac6e 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c | |||
@@ -247,12 +247,11 @@ static void init_windows() | |||
247 | 247 | ||
248 | static void do_tox() | 248 | static void do_tox() |
249 | { | 249 | { |
250 | static int conn_try = 1; | 250 | static int conn_try = 0; |
251 | static bool dht_on = false; | 251 | static bool dht_on = false; |
252 | if (!dht_on && !DHT_isconnected()) { | 252 | if (!dht_on && !DHT_isconnected() && !(conn_try++ % 100)) { |
253 | init_connection(); | 253 | init_connection(); |
254 | if (!(conn_try++ % 100)) | 254 | wprintw(prompt->window, "\nEstablishing connection...\n"); |
255 | wprintw(prompt->window, "\nAttempting to connect...\n"); | ||
256 | } | 255 | } |
257 | else if (!dht_on && DHT_isconnected()) { | 256 | else if (!dht_on && DHT_isconnected()) { |
258 | dht_on = true; | 257 | dht_on = true; |