diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-09-05 17:42:16 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-09-05 17:42:16 +0000 |
commit | ffab22bb35a990a72f3a13c9729680c01e23a727 (patch) | |
tree | 0fa073216284dd1b84008505763c39b3cf735e24 /server-fn.c | |
parent | 83af55bed4d4bcdb709a4b7db4543c6b5b489442 (diff) | |
download | rtmux-ffab22bb35a990a72f3a13c9729680c01e23a727.tar.gz rtmux-ffab22bb35a990a72f3a13c9729680c01e23a727.tar.bz2 rtmux-ffab22bb35a990a72f3a13c9729680c01e23a727.zip |
Only redraw all clients once when the backoff timer expires rather than every
second all the time.
Reported by Simon Nicolussi.
Diffstat (limited to 'server-fn.c')
-rw-r--r-- | server-fn.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server-fn.c b/server-fn.c index 8486b6c9..d3cdbd60 100644 --- a/server-fn.c +++ b/server-fn.c @@ -233,8 +233,8 @@ server_unlock(const char *s) return (0); wrong: - password_backoff = server_activity; password_failures++; + password_backoff = 0; for (i = 0; i < ARRAY_LENGTH(&clients); i++) { c = ARRAY_ITEM(&clients, i); @@ -260,7 +260,8 @@ wrong: } failures = password_failures % tries; if (failures > backoff) { - password_backoff += ((failures - backoff) * tries / 2); + password_backoff = + server_activity + ((failures - backoff) * tries / 2); return (-2); } return (-1); |