Skip to content
  • Rob Swindell's avatar
    Report getaddrinfo() failure result in Socket.error and error_str (not errno) · 6a5cf7f6
    Rob Swindell authored
    As Nelgin pointed out, a Socket.connect() failure for reasons of address/host
    lookup failure would report a stale/nonsense Socket.error/error_str value.
    
    This change required us to query/store the socket API/getaddrinfo error string
    at the time of failure (for the Socket.error_str property value) rather than
    converting from number to string at the time the property is read.
    
    This does mean that sometimes Socket.error is a errno value and sometimes its
    a getaddrinfo (EAI_*) error value. Since the EAI_* values are negative, it
    should be obvious which is which.
    6a5cf7f6