UDP connecion can fail on ICMP level (The destination host responds with 'Port Unreachable' which gets translated to 'Connection Refused' on UDP level). People are experiencing it (http://stackoverflow.com/questions/16130786/why-am-i-getting-the-error-connection-refused-in-python-sockets) however I was unable to reproduce it locally - which is strange because I have dealt with failing UDP connections in the past.
Provide a code that raises socket.error with the proper errno from a UDP connection.
UDP connecion can fail on ICMP level (The destination host responds with 'Port Unreachable' which gets translated to 'Connection Refused' on UDP level). People are experiencing it (http://stackoverflow.com/questions/16130786/why-am-i-getting-the-error-connection-refused-in-python-sockets) however I was unable to reproduce it locally - which is strange because I have dealt with failing UDP connections in the past.
Provide a code that raises
socket.errorwith the proper errno from a UDP connection.