title: Invalid Argument Follows Connection Refused in Python Sockets
body: <p>Please see the example output at:
  <a href="https://stackoverflow.com/questions/12394950/connection-refused">connection refused</a></p>
  
  <p>The question I have is why the first call to s.connect() throws "Connection Refused", but the second call throws "Invalid Argument". It's like the first call put the socket object s into some kind of error state. Is there a way to reset it?</p>
  
  <p>Thanks</p>