From 1d6d737927d4e99333a8e6ae26b44ca959fc1cd9 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Mon, 27 Jan 2014 19:57:41 +0000 Subject: Fixed lag meter getting stuck. Also lag_sent in struct server should have always been an unsigned long. Fixes #749. --- src/common/hexchat.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/common/hexchat.c') diff --git a/src/common/hexchat.c b/src/common/hexchat.c index d44fa2f4..07f91cfb 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -286,12 +286,16 @@ lag_check (void) NULL, NULL, 0); if (prefs.hex_net_auto_reconnect) serv->auto_reconnect (serv, FALSE, -1); - } else if (!serv->lag_sent) + } else { snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim); serv->p_ping (serv, "", tbuf); - serv->lag_sent = tim; - fe_set_lag (serv, -1); + + if (!serv->lag_sent) + { + serv->lag_sent = tim; + fe_set_lag (serv, -1); + } } } list = list->next; -- cgit 1.4.1