mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-26 02:04:53 +09:00
7472e98f6c
acmeLogger drained and closed the body of every ACME error response before handing the response back to golang.org/x/crypto/acme. The client parses that body to classify errors, so badNonce was no longer recognised: isBadNonce returned false, clearNonces was never called and Client.post treated the 400 as non-retriable. One badNonce reply therefore stops certificate renewal for good. autocert retries every 30-60 minutes, each attempt reuses a nonce stored from the previous failed response, that nonce has already expired, and the loop repeats until the process is restarted or the certificate expires. Restore the body with a fresh reader after logging it.