summary refs log tree commit diff stats
path: root/src/common/hexchat.c
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2013-04-09 20:54:22 +0100
committerArnav Singh <arnavion@gmail.com>2013-04-09 19:14:46 -0700
commit36694afe0e28eff7d8fb3d6f012d249b73a9ac77 (patch)
treee1493cab83a755c646b9bd27d4159562d412f974 /src/common/hexchat.c
parenta99111172dba67879e6e8dfdba3385872159cecd (diff)
Don't send ping's to the server if we are still waiting for a pong.
If the server don't respond in 30s just report the lag as +30s.

This fixes the bug where hexchat reset the lag meter every time a ping
was sent and no pong was received.
Diffstat (limited to 'src/common/hexchat.c')
-rw-r--r--src/common/hexchat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index aa18911e..4bea0742 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -281,7 +281,7 @@ lag_check (void)
 								 NULL, NULL, 0);
 				if (prefs.hex_net_auto_reconnect)
 					serv->auto_reconnect (serv, FALSE, -1);
-			} else
+			} else if (!serv->lag_sent)
 			{
 				snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);
 				serv->p_ping (serv, "", tbuf);