Skip to content
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

Merged
merged 8 commits into from
Jan 25, 2024
Merged

Conversation

floitsch
Copy link
Member

This time in the service.

@floitsch floitsch requested a review from kasperl January 24, 2024 13:18
Copy link
Contributor

@kasperl kasperl left a 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:
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

@kasperl kasperl left a 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.

@floitsch floitsch enabled auto-merge (squash) January 25, 2024 08:39
@floitsch floitsch merged commit 612593b into main Jan 25, 2024
5 checks passed
@floitsch floitsch deleted the floitsch/502-retry.service branch January 25, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants