X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=src%2Fclient%2Fio.c;h=b3724b5ffaf566cc51322d023961f2a945c2aa7a;hb=4e4313a0162999f961db391a2dcf943128040e56;hp=ec724786a4b1b87bf607f33b08d3556b273a46cd;hpb=28b8b4234e395c3fdc4800e5cfb3dcd70a15cadf;p=plomrogue
diff --git a/src/client/io.c b/src/client/io.c
index ec72478..b3724b5 100644
--- 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);
- 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)
{