home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Client: Abort test_ping_pong() earlier when server known to be active.
[plomrogue]
/
src
/
client
/
io.c
diff --git
a/src/client/io.c
b/src/client/io.c
index ec724786a4b1b87bf607f33b08d3556b273a46cd..b3724b5ffaf566cc51322d023961f2a945c2aa7a 100644
(file)
--- a/
src/client/io.c
+++ b/
src/client/io.c
@@
-237,9
+237,10
@@
static void test_ping_pong(time_t last_server_answer_time)
{
static uint8_t ping_sent = 0;
time_t now = time(0);
{
static uint8_t ping_sent = 0;
time_t now = time(0);
- if (ping_sent && last_server_answer_time > now - 3)
- {
- ping_sent = 0;
+ if (ping_sent && last_server_answer_time > now - 3) /* Re-set if last */
+ { /* ping was answered */
+ ping_sent = 0; /* with server */
+ return; /* activity. */
}
if (!ping_sent && last_server_answer_time < now - 3)
{
}
if (!ping_sent && last_server_answer_time < now - 3)
{