-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry when getting a 502 from cloudflare #940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
|
||
static create-client_ config/ServerConfigHttp network/net.Interface -> http.Client: | ||
if config.root-certificate-ders: | ||
root-certificates := config.root-certificate-ders.map: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should redoing this if the 502s are quite frequent?
We can easily move the security store and root certificates list construction to the constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The security-store should absolutely be stored outside, as we would otherwise lose the resume-information.
I kept the root-certificate parsing in here, as I hope that the GC can get rid of the certificates more easily this way.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good.
I think we should look at installing the certs. It seems pretty easy to do.
This time in the service.