Closed
Description
by junshi04:
The bug description is below. The program to reproduce the bug is attached. On Windows, net.UDPConn.ReadFrom may return an error of "WSARecvFrom ...: No service is operating at the destination network endpoint on the remote system", when the same UDPConn is used to write a packet that has no recipient. To reproduce the error, set "-me" to the local IP:port, "-peer" to a random IP:port, and run the attached file. The ReadFrom will fail immediately with the "No service is operating ..." error. If "-peer" is not set, the net.UDPConn is not used to write packets, and the ReadFrom won't fail. If "-peer" is set to an address with a recipient, the ReadFrom won't fail either. Looks like the error is actually for the write, writing to the peer IP:port generates an ICMP error, but the error is returned to the ReadFrom.
Attachments:
- readfrombug.go (916 bytes)