http: free up quic listener when stopping#7177
Conversation
|
Hi, does it also help to implement UDP wrappers the way TCP ones (i.e., listener wrappers) are implemented? |
|
No, this only frees up resources, not adds new interfaces to facilitate udp multiplexing. |
mholt
left a comment
There was a problem hiding this comment.
Thanks Weidi!
That is definitely weird, though, to have to call Close() twice, once before application-layer (HTTP server) shutdown and once after app-layer shutdown.
Is that necessary due to the nature of H3/UDP? Like how connections are emulated concepts in H3 maybe?
|
The double Close is weird, but I don't want to introduce a new method. In the same version that quic-go stopped closing user provided listeners, closed listeners won't affect accepted connections. It used to be that closing a listener will close all the connections as well. Yes, it's how quic connections work, all the quic connections are user space implementation of a udp socket multiplexer. So quic-go never closes the udp socket even when the quic listener is closed. Caddy needs to close the udp socket. As documented, the first Close is to stop new connections, the second is to release packet conns. |
|
Gotcha, makes sense. I think we can give this a try! |
Fix 7172.