mirror of https://github.com/shred/acme4j
Only throw AcmeRetryAfterException when there is an actual retry date
parent
ef7070a3b6
commit
3d6342a917
|
@ -188,10 +188,12 @@ public class Authorization extends AcmeResource {
|
|||
|
||||
if (rc == HttpURLConnection.HTTP_ACCEPTED) {
|
||||
Date retryAfter = conn.getRetryAfterHeader();
|
||||
if (retryAfter != null) {
|
||||
throw new AcmeRetryAfterException(
|
||||
"authorization is not completed yet",
|
||||
retryAfter);
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new AcmeNetworkException(ex);
|
||||
}
|
||||
|
|
|
@ -93,10 +93,12 @@ public class Certificate extends AcmeResource {
|
|||
int rc = conn.sendRequest(getLocation());
|
||||
if (rc == HttpURLConnection.HTTP_ACCEPTED) {
|
||||
Date retryAfter = conn.getRetryAfterHeader();
|
||||
if (retryAfter != null) {
|
||||
throw new AcmeRetryAfterException(
|
||||
"certificate is not available for download yet",
|
||||
retryAfter);
|
||||
}
|
||||
}
|
||||
|
||||
if (rc != HttpURLConnection.HTTP_OK) {
|
||||
conn.throwAcmeException();
|
||||
|
|
Loading…
Reference in New Issue