net: UDPConn.ReadFromUDP returns non-nil Addr for generic errors #46238
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
What version of Go are you using (
go version
)?tip
Does this issue reproduce with the latest release?
Not 1.16
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
https://play.golang.org/p/IGSlLDraksK
What did you expect to see?
On 1.16, I see:
What did you see instead?
On tip, I see:
i.e.,
ReadFromUDP
no longer returns a nil Addr for generic (non-address-specific) errors.This breaks an internal test which retries if it receives a non-nil Addr and error from
ReadFromUDP
. (I'm actually unsure if it is possible to get a valid address along with an error? If not, perhaps this test is just broken.)Either way, this change was caused by http://golang.org/cl/291509, where the difference in behavior appears to be unintentional, so I think it should be fixed.
cc @FiloSottile
The text was updated successfully, but these errors were encountered: