Add SO_REUSEPORT support for EntryPoints

This commit is contained in:
Aofei Sheng 2024-01-30 21:56:05 +08:00 committed by GitHub
parent 40de310927
commit d02be003ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 279 additions and 43 deletions

View file

@ -96,10 +96,7 @@ func TestProxy_ServeUDP_MaxDataSize(t *testing.T) {
func newServer(t *testing.T, addr string, handler Handler) {
t.Helper()
addrL, err := net.ResolveUDPAddr("udp", addr)
require.NoError(t, err)
listener, err := Listen("udp", addrL, 3*time.Second)
listener, err := Listen(net.ListenConfig{}, "udp", addr, 3*time.Second)
require.NoError(t, err)
for {