Fixed a redundant check for retry queue emptiness and timeout expiration.