Problem
RPC clients are able to easily DoS the HTTP server due to an obligatory worker thread sleep upon authentication failure.
Solution
Remove the sleep.
While this allows the guess rate to increase, it also fixes the DoS vector and reduces production code.
History
fe98cf8dc5066368b78e9ce208118c3532598dd2 from 2010 introduced RPC authentication along with the sleep. At that point the password authentication was timing-sensitive depending on the length, so the credentials could have been brute-forced. A sleep was added to help mitigate these timing attacks (and also reduce the guess rate).
The same author then introduced TimingResistantEqual() in 42656ea2e552b027e174fdceab7348ffcb8245c4 / #2886 in 2013 to solve the timing attack once and for all (https://github.com/bitcoin/bitcoin/issues/2838 / CVE-2013-4165). That made the sleep only serve to reduce the guess rate.
Severity
Low since the attack requires RPC clients to be granted network access to a node.