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

use a net.UDPConn in fakeClosePacketConn #3998

Closed
marten-seemann opened this issue Jan 29, 2021 · 2 comments
Closed

use a net.UDPConn in fakeClosePacketConn #3998

marten-seemann opened this issue Jan 29, 2021 · 2 comments
Labels
bug 🐞 Something isn't working
Milestone

Comments

@marten-seemann
Copy link
Contributor

Caddy should use a *net.UDPConn instead of a net.PacketConn in

caddy/listeners.go

Lines 205 to 210 in e2940c8

type fakeClosePacketConn struct {
closed int32 // accessed atomically
usage *int32 // accessed atomically
key string
net.PacketConn
}

This will allow quic-go to set the receive buffer size, see https://caddy.community/t/udp-receive-buffer-size-quic/11244 and quic-go/quic-go#3024.

@francislavoie
Copy link
Member

Is that safe to change though? Does that code path use TCP too? 🤔

@marten-seemann
Copy link
Contributor Author

I don't think that's possible. net.TCPConn doesn't implement net.PacketConn.

@francislavoie francislavoie added the bug 🐞 Something isn't working label Jan 29, 2021
@francislavoie francislavoie added this to the v2.4.0 milestone Jan 29, 2021
francislavoie added a commit to francislavoie/caddy that referenced this issue Jan 29, 2021
@mholt mholt closed this as completed in ec3ac84 Feb 16, 2021
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

No branches or pull requests

2 participants