acme: fix bad nonce retry counter

Actually return the error on the 3rd try.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-05-10 11:52:04 +02:00
parent a1b71c3c7d
commit b41f9e9fec

View File

@ -662,9 +662,10 @@ const fn retry() -> Retry {
impl Retry {
fn tick(&mut self) -> Result<(), Error> {
if self.0 >= 3 {
Error::Client(format!("kept getting a badNonce error!"));
Err(Error::Client(format!("kept getting a badNonce error!")))
} else {
self.0 += 1;
Ok(())
}
self.0 += 1;
Ok(())
}
}