mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Only redraw all clients once when the backoff timer expires rather than every
second all the time. Reported by Simon Nicolussi.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user