Roundcube: How do decrease response time to failed login attempts?

I found this hack: https://github.com/roundcube/roundcubemail/issues/7754

Change line 163 of the rcube_imap.php file in Debian distribution of rc in /var/lib/roundcube/program/lib/Roundcube to:

} while(!$this->conn->connected() && $data['retry']);