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

Fix http3 servers dying after reload #4654

Merged
merged 2 commits into from
Mar 22, 2022
Merged

Fix http3 servers dying after reload #4654

merged 2 commits into from
Mar 22, 2022

Conversation

renbou
Copy link
Collaborator

@renbou renbou commented Mar 21, 2022

This PR should finally resolve issues with http3 servers dying after Caddy's reload. Currently it pins the quic-go dependency to the commit in lucas-clemente/quic-go where the necessary changes are made. I've tested everything out locally and used pprof to check that no goroutines are being leaked.

go.mod Outdated Show resolved Hide resolved
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this actually works, this is awesome. Thanks so much @renbou -- can't wait to try it out! (The code looks good though.)

// fakeClosedErr returns an error value that is not temporary
// nor a timeout, suitable for making the caller think the
// listener is actually closed
func (fcl *fakeCloseListener) fakeClosedErr() error {
func fakeClosedErr(l interface{ Addr() net.Addr }) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo, very nice.

@renbou
Copy link
Collaborator Author

renbou commented Mar 22, 2022

Thank you @marten-seemann! Might as well merge in the optimization in the same PR.

@francislavoie francislavoie added the bug 🐞 Something isn't working label Mar 22, 2022
@francislavoie francislavoie added this to the v2.5.0 milestone Mar 22, 2022
renbou added 2 commits March 22, 2022 19:43
- Added caddy.ListenQUIC which returns a QUIC listener valid
for reloading in Caddy (for example reloading the http3 server).
- Finally resolved issues encountered in #2727
@francislavoie francislavoie merged commit c9b5e7f into caddyserver:master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants