From eef0e189694ea93f1e6c2b54a5fce49faa87b2d0 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 5 Sep 2009 17:42:17 +0000 Subject: Only redraw all clients once when the backoff timer expires rather than every second all the time. Reported by Simon Nicolussi. --- usr.bin/tmux/server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/server.c') diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 6af90ed464d..400bed6431a 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.28 2009/09/04 13:29:10 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.29 2009/09/05 17:42:16 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1210,11 +1210,12 @@ server_second_timers(void) } } - if (t > password_backoff) { + if (password_backoff != 0 && t >= password_backoff) { for (i = 0; i < ARRAY_LENGTH(&clients); i++) { if ((c = ARRAY_ITEM(&clients, i)) != NULL) server_redraw_client(c); } + password_backoff = 0; } /* Check for a minute having passed. */ -- cgit v1.2.3