summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/fe-gtk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index deefb788..d87ccd4e 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -735,6 +735,10 @@ fe_set_lag (server *serv, int lag)
 		lag = (nowtim - serv->lag_sent) / 100000;
 	}
 
+	/* if there is no pong for >30s report the lag as +30s */
+	if (lag > 300 && serv->lag_sent)
+		lag=300;
+
 	per = (double)((double)lag / (double)10);
 	if (per > 1.0)
 		per = 1.0;