mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: fix BenchmarkWriteToReadFromUDP on Windows
Using 0.0.0.0 for ListenUDP listens on all addresses. Calling LocalAddr on that Conn returns 0.0.0.0. Sending to 0.0.0.0 doesn't seem to work on Windows. See #22827. Change-Id: I4a48fbabe65a63e07600a65309977cec08a9c1e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/301850 Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Trust: Filippo Valsorda <filippo@golang.org>
This commit is contained in:
parent
de2b27dee7
commit
661f3f15d5
1 changed files with 1 additions and 1 deletions
|
|
@ -447,7 +447,7 @@ func TestUDPReadSizeError(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkWriteToReadFromUDP(b *testing.B) {
|
func BenchmarkWriteToReadFromUDP(b *testing.B) {
|
||||||
conn, err := ListenUDP("udp4", new(UDPAddr))
|
conn, err := ListenUDP("udp4", &UDPAddr{IP: IPv4(127, 0, 0, 1)})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue