listen on IPv6 too in case of multicast

This commit is contained in:
aler9
2021-06-19 16:32:21 +02:00
parent 8dc27ca9a7
commit 2cff0d51d3
4 changed files with 6 additions and 6 deletions

View File

@@ -441,7 +441,7 @@ func TestServerRead(t *testing.T) {
defer l2.Close()
case "multicast":
l1, err = net.ListenPacket("udp4", "224.0.0.0:"+strconv.FormatInt(int64(th.Ports[0]), 10))
l1, err = net.ListenPacket("udp", "224.0.0.0:"+strconv.FormatInt(int64(th.Ports[0]), 10))
require.NoError(t, err)
defer l1.Close()
@@ -455,7 +455,7 @@ func TestServerRead(t *testing.T) {
require.NoError(t, err)
}
l2, err = net.ListenPacket("udp4", "224.0.0.0:"+strconv.FormatInt(int64(th.Ports[1]), 10))
l2, err = net.ListenPacket("udp", "224.0.0.0:"+strconv.FormatInt(int64(th.Ports[1]), 10))
require.NoError(t, err)
defer l2.Close()